How To/webdev/

How to achieve position:fixed in Intenet Explorer 6

I know 2 ways to simulate fixed in IE6 using css.

1st WAY

Use standard compliance mode (Use proper <!DOCTYPE>).

Define styles for <html /> and <body />:
html,body{height:100%; overflow: auto; margin:0; padding:0;}

use position: absolute for elements you want to behave as fixed.

2nd WAY

Set fixed height for body, set overflow:hidden. Use div with {height:100%; overflow:auto; position: relative;}.
Every element with position absolute outside that div will behave as fixed.