3 <meta content=
"text/html; charset=windows-1251" http-equiv=
"Content-Type">
5 .d1{position:fixed;top:
50%;right:
50%;z-index:
2;overflow:hidden;}
6 .d2{position:fixed;bottom:
0;left:
0;z-index:
2;width:
100%;background-color:darkgray;}
7 .o {background:green;height:
40px;width:
200px;}
8 .t { width:
2000px; height:
198px;background-color: lightgray; border:
1px solid blue;}
12 function remove_fixed()
14 document
.getElementById("d2").style
.position
= "static";
19 document
.getElementById("d2").style
.position
= "fixed";
25 <div class=
"d2" id=
"d2">This is the parent div.
26 <div class=
"d1" id=
"d1"><div class=
"o">This is the nested div.
</div></div>
36 <button onclick=
"remove_fixed();">remove fixed
</button>
40 <button onclick=
"add_fixed();">add fixed
</button>