Web & graphic design notes

Go down

CSS: property position:fixed in IE6

Many people ask questions on forums how to use css property position:fixed in the IE6 browser if we need to stick a block in the particular place of the web page.  Instead of using the property mensioned above, you can try position:absolute with expression, which is calculates the exact element’s position depending on scrol position.

#fixed-block {
position: fixed;
top: 50px;
right: 50px;
background: #cccccc;
padding: 4px;
width: 150px;} 
 
* html #block_fixed {position: absolute;
top: expression(eval(document.documentElement.scrollTop) + 50 + 'px');}
 

Also, you can try the following technique without a script:

html, body {
height: 100%;  overflow: auto; 
}
div.fixed {
position: absolute;
}
 
Share

Go on top
Exim Design
W3C XHTML and CSS valid design
Process || Services || Links || Sitemap || Search || © 2005 - 2010 Exim Design - Web Design Studio || New York - Portland - Seattle - Toronto - Moscow - Kiev