开发者

IE8 bottom:0 in position:absolute behaves like position:fixed

I have a DIV that must always stay on bottom/left of the page, something like a footer menu.

div#bottom_menu
{
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0;
  width: 90%;
}

My page has min-height defined and when the user shrinks it below that it gets scroll bars. The problem is when it happens, in IE8 the div moves up to match the new viewpoint lowest point like开发者_StackOverflow it would behave if it were with position: fixed. Worse than that, when you scroll down again the element does not move down (like in position: fixed) but ridiculously stays in the middle of the page. This works perfectly in Firefox, Opera and Chrome. Is that a known IE bug and how to work around it?


Great, I got Tumbleweed badge for super unpopular question.

While waiting someone to help me here I solved it myself (as usual). I did it by putting bottom_menu in a wrapper div pretty similar to the old container, only difference is that is has no overflow: hidden; and is not directly inside the body. That fixed it by some strange reason. Maybe it will help somebody.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜