Skip to content

Instantly share code, notes, and snippets.

@edheltzel
Created May 16, 2018 15:19
Show Gist options
  • Save edheltzel/913054e671962c894d017c14f41c6346 to your computer and use it in GitHub Desktop.
Save edheltzel/913054e671962c894d017c14f41c6346 to your computer and use it in GitHub Desktop.
Position footer of a page at the bottom of a page regardless of height of content. credit CSSTricks https://css-tricks.com/snippets/css/fixed-footer/
#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');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment