Page layout

This commit is contained in:
Edgar P. Burkhart 2020-08-07 08:39:02 +02:00
parent 3b829ffae5
commit bc7d50871a
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 50 additions and 1 deletions

View file

@ -5,3 +5,48 @@ html {
*, *::before, *::after { *, *::before, *::after {
box-sizing: inherit; box-sizing: inherit;
} }
body {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
margin: 0;
}
.left, .right {
position: absolute;
top: 0;
bottom: 0;
width: 50%;
}
.right {
right: 0;
}
.left {
left: 0;
text-align: right;
}
.left h1 {
position: absolute;
padding-right: 1em;
height: 1em;
line-height: 1em;
font-size: 4rem;
margin: 0;
width: 100%;
font-family: IBM Plex Serif;
}
.left h1:first-of-type {
top: calc( 50% - 1em );
font-weight: 800;
}
.left h1:last-of-type {
bottom: calc( 50% - 1em );
font-weight: 400;
}

View file

@ -27,6 +27,10 @@
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
</head> </head>
<body> <body>
<h1>Hello World!</h1> <div class="left">
<h1>Edgar P.</h1>
<h1>Burkhart</h1>
</div>
<div class="right"></div>
</body> </body>
</html> </html>