Skip to content

Instantly share code, notes, and snippets.

@michaelee
Created April 13, 2009 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelee/94252 to your computer and use it in GitHub Desktop.
Save michaelee/94252 to your computer and use it in GitHub Desktop.
html, body {
padding: 0;
margin: 0;
height: 100%; /* so that the page is "defined" to be 100% */
}
#page {
position: relative;
min-height: 100%; /* this way the page div stretches to occupy even a short page */
}
#content {
padding-bottom: 100px; /* account for overlapping footer */
}
#footer {
position: absolute;
bottom: 0; /* position footer at bottom of page, overlapping content div */
height: 100px; /* same value from above */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment