Skip to content

Instantly share code, notes, and snippets.

@Ricardo-Diaz
Created October 25, 2012 22:43
Show Gist options
  • Select an option

  • Save Ricardo-Diaz/3955937 to your computer and use it in GitHub Desktop.

Select an option

Save Ricardo-Diaz/3955937 to your computer and use it in GitHub Desktop.
CSS: Footer Fixed Position
Giving your footer a fixed position – position:fixed
This makes your footer stick to the bottom of the screen. Change the background color to your needs.
#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');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment