I am trying to make a footer that stays on the bottom of the page, so when you scroll down it should stay there.
How can I do this the best?
PS: I do not have any code yet, I am just looking for how I can do this the best way possible.
I am trying to make a footer that stays on the bottom of the page, so when you scroll down it should stay there.
How can I do this the best?
PS: I do not have any code yet, I am just looking for how I can do this the best way possible.
Use the below code on the Footer to make it stay fixed at the bottom.
For Instance,
The HTML:
<div class="footer"><!-- Your footer code should be here. --></div>
The CSS:
.footer{
position:fixed;
bottom:0;
}
This will make the footer to stay at the bottom keeping it fixed.
Hope this helps.
#footer {
clear: both;
position: relative;
z-index: 10;
height: 3em;
margin-top: -3em;
}
This CSS can help you.
For better explanation refer to this
http://www.lwis.net/journal/2008/02/08/pure-css-sticky-footer/
This blog can also do the needful
http://fortysevenmedia.com/blog/archives/making_your_footer_stay_put_with_css/