开发者

IE6 z-index on two absolutely positionned divs

开发者 https://www.devze.com 2023-02-15 07:56 出处:网络
I got tired facing IE6 Bugs. The issue, is two (position:absolute) divs are not working properly on their z-index:

I got tired facing IE6 Bugs. The issue, is two (position:absolute) divs are not working properly on their z-index: Considering the following example;

/* css */
#overlay{
    position:absolute;
    height:1200px;
    z-index:2;
    top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop+(document.body.clientHeight-this.clientHeight));
}

#dropping_list{
    position:absolute;
    top:34px;
    left:0;
    padding:0;
    width:635px;
    max-height:455px;
    background:#FFF;
    display:none;
    overflow:auto;
    z-index:3;
}

<div id="overlay"></div>
<div id="dropping_list">some content here</div>

But i got ovelay above #droping_list! Any help would be so much appreciated;

For more information you can see it in action at: http://www.monde-presse.com

On the search form at the top, type in tion and hit enter to get some r开发者_开发问答esults for the test.

Barry


Re-arrange your elements:

from:

<div id="overlay">
    <div id="dropping_list">some content here</div>
</div>

to:

<div id="overlay"></div>
<div id="dropping_list">some content here</div>
0

精彩评论

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