Position Fixed IE6

Position Fixed

CSS Fixed Positioning is Cross-Browser

This CSS method gives IE6 the ability to use position fixed in a more useful way than the other alternatives available on the internet. In particular, other methods make all absolutely positioned elements act like they have position fixed applied to them in IE6. While this solution uses a similar technique, the normal use of all types of the position properties still function as they were meant to.

Fixed positioning won't disable absolute positioning

In short, this CSS and minimal extra HTML markup allows you to use both fixed positioning and absolute positioning without having to make a compromise in any browser. Simply put any elements that will used fixed positioning outside of the wrapper div and tell IE to position it absolutely. Any elements inside the wrapper div can be absolutely positioned normally.

The one drawback

There is one drawback to this method, and it relates to the scrollbars in all browsers. Any elements with a fixed position touching very bottom or right of the page will sit above the browser's scrollbars. Apart from that, this works perfectly in all major browsers.

Usage of the CSS

Perfect, what do I have to do to use this?

This is completely free to use without restriction, and I don’t require any recognition for the use of this on personal or commercial websites that you use my code on. Nevertheless, I did spend a considerable amount of time developing and refining my examples, so if you do find the kindness to link to my website, I’d be very grateful.

View the CSS or learn about using it

This box has its position fixed applied to it. For IE6, it is set to absolute positioning using the * html hack and works just like fixed positioning.

The "View the CSS" and "learn about using it" links to the right are also absolutely positioned, but they don't behave like a fixed element in IE6.