* { margin:0; padding:0; }
html, body {
height: 100%;
}
body #fixedElement {
position:fixed !important;
position: absolute; /*ie6 and above*/
top: 0;
right: 0;
}
#page-wrap {
width: 600px;
margin: 0 auto;
font: 16px/2 Georgia, Serif;
}
如果您想沿着浏览器窗口的底部边缘进行固定定位,则主体和html内容的高度为100%。
翻译自: https://css-tricks.com/snippets/css/fixed-positioning-in-ie-6/