Skip to content

Instantly share code, notes, and snippets.

@jnaskali
Created March 8, 2012 10:05
Show Gist options
  • Save jnaskali/2000090 to your computer and use it in GitHub Desktop.
Save jnaskali/2000090 to your computer and use it in GitHub Desktop.
CSS: Sticky footer
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
height: 142px; /* .push must be the same height as .footer */
}
/*
Sticky Footer by Ryan Fait
http://ryanfait.com/
*/
/*** HTML: ***
<wrapper>
<header />
<content />
</wrapper>
<footer />
*** /HTML ***/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment