Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
`display: table` sticky footer trick
<header class="page-row">
<h1>Site Title</h1>
<main class="page-row page-row-expanded">
<p>Page content goes here.</p>
<footer class="page-row">
<p>Copyright, blah blah blah.</p>
body { height: 100%; }
body {
display: table;
width: 100%;
.page-row {
display: table-row;
height: 1px;
.page-row-expanded { height: 100%; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment