Skip to content

Instantly share code, notes, and snippets.

@magemore
Created April 25, 2012 04:52
Show Gist options
  • Save magemore/2486513 to your computer and use it in GitHub Desktop.
Save magemore/2486513 to your computer and use it in GitHub Desktop.
Giving your footer a fixed position – position:fixed
#footer {
position:fixed;
left:0px;
bottom:0px;
height:32px;
width:100%;
background:#333;
}
/* 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');
@magemore
Copy link
Author

This makes your footer stick to the bottom of the screen. Change the background color to your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment