Hello everybody, I've browsed to all question related to "sticky footer" and nothing helped me because my #content div is doesnt not always have sufficient content to push footer to the bottom, here is the code I've used to achiveve this but apparently I did something wrong:
CSS:
/* FOOTER FIX */
html, body, div#container { height: 100%; }
body > div#container { height: auto; min-height: 100%; }
div#index_body { padding-bottom: 30px; }
.footer {
clear: both;
position: relative;
z-index: 10;
height: 30px;
margin-top: -45px;
padding-top:15px;
}
.footer {
color: #666;
background-color:#F4F7FA;
border-top:1px solid #E6E7E8;
font-size:95%;
text-align: center;
} /* END FIX */
Here is some HTML so you know how it all looks ,
HTML:
<html>
<body>
<div id="container">
<div id="index_body">
</div><!--end index_body -->
<div id="index_footer" class="footer">
</div><!--end footer -->
</div><!--end container -->
</body>
</html>
I've really tried million combinations with many sticky footers and none of them work, some of them work when index body has loads of text images only then the footer goes to the end but when it doesn't have much content let say 2 paragraph tags and an image the footer doesn't stick. Maybe this is not possible with just css, because the index_footer height is not fixed? Is there a way to do this with javascript or what is the right way to do this ? cheers
EDIT : My screen resolution is really big maybe that is the problem its 1680 x 1050