To get a sticky footer:
-
Have a
<div>
withclass="wrapper"
for your content. -
Right before the closing
</div>
of thewrapper
place the
<div class="push"></div>
. -
Right after the closing
</div>
of thewrapper
place the
<div class="footer"></div>
.
* {
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 */
}