Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: how to get position:fixed in IE?
12-22-2006, 09:33 AM #1
- Join Date
- Dec 2006
- Thanked 0 Times in 0 Posts
how to get position:fixed in IE?
Apparently there is a problem with position:fixed in IE6 and older? I've got a submenu div that I want to remain at the top of its frame, and I've given it the CSS position:fixed -- which works in all browsers (Mac and PC) except for IE.
BTW -- here's the url if you want to look:
So I did some research and found a workaround that is specific to IE using the cool CSS expression(). But only IE should see this, so I wrapped it in a conditional comment. The relevant code looks like this:
top: expression(body.scrollTop + 0 + "px");
So I set the submenu style for standard browsers as position:fixed, then I write the IE-specific hack using the same submenu style name, which should overwrite it.
Of course, it doesn't work. And since I'm not familiar with the CSS expression() functionality, I'm not sure where the error is.