Position:fixed on IE6
Step 1: Inset background:fixed in body.
Step 2: Use expression(offsetParent.scrollTop+offsetParent.clientHeight-400+'px');
body { background:url(imgs/pageBg.png) fixed;}
#menubar {
width:100px;
height:100px;
position:fixed;
bottom:0;
right:0;
z-index:10000;
_position:absolute;
_top:expression(offsetParent.scrollTop+offsetParent.clientHeight-400+'px');
}
[if IE 6] example:
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#fixed{position:absolute;right:17px;}
/* fixed元素的绝对位置是相对于HTML元素来说,而滚动条是body元素的,这是设置right:17px的原因 */
#fixed { position:absolute; top:expression(eval(document.body.scrollTop + 50));}
You can:
/* IE7+ FF Other Standard Browser */
html > body #menubar {...}
/* IE6 Only */
* html #menubar {...}