Tags

, , , , ,


Position fixed is not supported by IE 6, I searched about it in many sites and get the following to be fixed.

here is the html code

<html>
<body>
<div id='banner'>
Top always fixed
</div>
<div id='contents'>
Put your contents here
</div>
<div id='footer'>
Footer or other contents
</div>
</body>
</html>

here is the css for above html

* html #banner
{
position: absolute;
top: expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px');
left: expression(0+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px');
padding-bottom:2px;
padding-top:2px;
background:#000000;
height:35px;
width:100%;
 z-index:1000;
}
* html #footer
{
position: absolute;
left: expression(0+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px');
top: expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop +(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
height: 32px;
 width: 100%;
font-size: 12pt;
background: #000000;
overflow: hidden;
 z-index:1000;
}

You can do the rest of thing as your own. The two css gives you to fixed the position in IE 6, for the other browser you can easily use “Position:Fixed;” its work with me hope it’ll work for you 🙂

Advertisements