Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
Created July 20, 2010 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitaljhelms/483503 to your computer and use it in GitHub Desktop.
Save digitaljhelms/483503 to your computer and use it in GitHub Desktop.
Fixed positioning, even in IE6
html, body { min-height:100%; *height:auto !important; height:100%; }
#foobar { height:100%; width:100%; overflow:hidden; position:fixed; z-index:0; top:0; left:0; }
/* IE6 doesn't recognize position:fixed */
/* http://bit.ly/blamhO */
body { _background-image:url(about:blank); _background-attachment:fixed; }
/* http://bit.ly/aOv4iK */
#foobar { _position:absolute; _top:expression(eval(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment