Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
* {
margin: 0;
padding: 0;
}
main {
position: relative;
}
div {
background-color: yellow;
height: 200px;
width: 100%;
position: fixed;
bottom: 0;
z-index: 1;
border-top: 2px solid gold;
}
</style>
</head>
<body>
<main>
<h2>This is the header</h2>
<div>Some text aligns to the bottom</div>
</main>
</body>
</html>