Skip to content

Instantly share code, notes, and snippets.

@XtofK
Created April 5, 2013 07:03
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XtofK/5317209 to your computer and use it in GitHub Desktop.
Save XtofK/5317209 to your computer and use it in GitHub Desktop.
Sticky footer by Ryan Fait
* {
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/
*/
<div class="wrapper"> </div>
<div class="push"> </div>
</div>
<div class="footer"> </div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment