Skip to content

Instantly share code, notes, and snippets.

@markvital
Created November 9, 2012 16:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save markvital/4046697 to your computer and use it in GitHub Desktop.
Save markvital/4046697 to your computer and use it in GitHub Desktop.
Sticky Footer (Make the Footer Stick to the Bottom of a Page)
* {
margin: 0;
}
html, body {
height: 100%;
}
/* main content wrapper */
.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 provided by Ryan Fait
* http://ryanfait.com/sticky-footer/
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment