开发者

position:fixed on element in ie7/8 and problems with the scrolling of the content inside it

开发者 https://www.devze.com 2022-12-29 03:02 出处:网络
I got an element fixed in the center of the screen, having specific dimensions (let\'s say 500x500). The element has content, which is larger then the height of the element and thus causes scroll bar

I got an element fixed in the center of the screen, having specific dimensions (let's say 500x500). The element has content, which is larger then the height of the element and thus causes scroll bar to appear, which is fine. In FF/WebKit everything works nice. However in IE 7/8 ... content of the fixe开发者_JAVA百科d element doesn't scroll, or scrolls with HUGE delay. If I change position:fixed to position:absolute, it starts to scroll fine, but with position:fixed... it's just a pain!..

Is it some known issue? Anyone heard/encountered something like that? Any ideas how to deal with such?...


Only thing any useful I could find on this subject was this, How to create Position:fixed in IE5.5+.

Position:fixed was implemented in IE7. Maybe it still has some issues with it, but there might be something else in your markup or CSS that would cause such behaviour.

It'd be beneficial if we could see some code to help us with your problem.


It turned out that there was additional problem to this - shadow filter beneath that element with position:fixed and scrolling content within it. We couldn't find any solution to this other then either disabling shadow filter in IEs or disabling position:fixed.

:(


.fixDocument
{
    position: absolute;
    top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop : document.body.scrollTop);
}

Check this page: http://www.gunlaug.no/contents/wd_additions_15.html

0

精彩评论

暂无评论...
验证码 换一张
取 消