#fixed {
border:1px solid red;
height:100px;
left:50%;
margin-left:-500px;
position:fixed;
top:0;
width:1000px;
}
how can i make this element display the same way in IE6? the div is the first element directly in the body
regards
IE 6 doesn’t support
position: fixed(Source) and there is no easy CSS-only workaround as far as I know.You would need to employ a JavaScript based workaround solution that adjusts the element’s position when the page gets scrolled.
There’s a very simple solution outlined in this SO question. Those JS based solutions tend to be pretty jiggly and jerky in my experience, they are nowhere near the smoothness of
position: fixed.