Created
July 20, 2010 20:18
-
-
Save digitaljhelms/483503 to your computer and use it in GitHub Desktop.
Fixed positioning, even in IE6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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