In the css tutorial, ie6 position: fixed (fixed positioning) uses position: absolute's solution to completely use position: absolute to solve the fixed positioning problem. Because other browsers support absolute positioning, they have passed tests in ie6, 7, 8, 9, ff, and chrome. Note: you cannot set the height of the element mod-test. Otherwise, there is no scroll bar. Instead, you should set a container in it to set a height.
<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 3 4 <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/>
5 <title> ie6 position: fixed bug </title>
6 <style type = "text/css">
7 body {height: 100%; overflow: hidden; position: relative ;}
8 html {height: 100%; overflow: hidden ;}
9. test {position: absolute; top: 100px; left: 100px; padding: 2px; border: 1px solid # aaa ;}
10. mod-test {
11 height: 100%;
12 overflow: auto;
13}
14. inlet {
15 height: 1800px;
16}
17 </style>
18 19 <body>
20 <div class = "mod-test">
21 <div class = "inlet">
22 23 <a href = "" title = "ie6 position: fixed bug" rel = "bookmark"> ie6 position: fixed bug </a>
24 25 <div class = "test">
26 <br/> I have been
27 </div>
28 </div>
29 </div>
30 </body>