Skip to content

Instantly share code, notes, and snippets.

@garnieretienne
Created April 19, 2016 12:55
Show Gist options
  • Save garnieretienne/9eb3cd08cfee552f2de5b8d4085a6d99 to your computer and use it in GitHub Desktop.
Save garnieretienne/9eb3cd08cfee552f2de5b8d4085a6d99 to your computer and use it in GitHub Desktop.
Simple page with a title
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<style type="text/css">
@page {
size: 6in 9in;
margin: 0;
}
body {
margin: 0;
}
.page {
position: relative;
width: 6in;
height: 9in;
background-color: gray;
}
.page > .title {
position: absolute;
top: 1in;
left: 0.5in;
width: 5in;
text-align: center;
background-color: yellow;
font-family: 'Raleway';
font-size: 1.8em;
}
</style>
</head>
<body>
<div class="page">
<div class="title">Hello World</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment