Tuesday, May 10, 2011

Fixed Footer

Okay, so you're making you're web page and now you want to extend the content area all the way down the page. So what happens to the Footer? Well, THEN you have to make the Footer hug the bottom of the page. How do you do this? There are a few tricks, but I have chosen this one, and then made it work as an example. First here is the code snippet from CSS-Tricks:

#footer {
position:fixed;
left:0px;
bottom:0px;
height:30px;
width:100%;
background:#999;
}

/* IE 6 */
* html #footer {
position:absolute;
top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
}

No comments:

Post a Comment