使用 960 网格时 IE8 中的 Z 索引问题

发布于 2024-10-10 08:47:08 字数 395 浏览 0 评论 0原文

我在 IE8 中遇到问题,我的下拉式导航位于另一个元素后面。我已经尝试了一切,从将有问题的元素的 zindex 设置为 1,将下拉列表设置为 99 和 999。我认为这与我使用 960 网格这一事实有关,因为它以前可以工作,但我没有使用。

更新:问题出现在 IE8.0.6 中,但不是 IE8.0.7

更新 2:问题出现在 IE8.0.6001.187021C 中,但不是 IE8.0.6001.1870

我讨厌微软。

这是我的样式表,您可以看到发生的问题此处

I am having an issue in IE8 where my dropdown-style navigation is going behind another element. I have tried everything from setting the offending element's zindex to 1 and the dropdown to 99 and 999. I think it has something to do with the fact that I'm using 960 grid, as it worked before when I wasn't.

Update: Problem occurs in IE8.0.6 but not IE8.0.7

Update 2: Problem occurs in IE8.0.6001.187021C but not IE8.0.6001.1870

I hate Microsoft.

Here is my stylesheet and you can see the issue happening here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

叶落知秋 2024-10-17 08:47:08

这个问题也出现在 IE 7.0.6002.18005 中,我没有 8,但以下内容似乎在本地对我有效,并且看起来它不会破坏 Firefox,所以也许它也适用于 IE8,但我又不这样做不知道它是否对您可行,或者是否会在将来的更新中给您带来问题,但值得一试:

在主页中我替换了几个标签:

a)


b) 所有出现


  • 查找/替换以下类 &外部 CSS 选择器如下:

    960grid.css

    .container_5 .grid_1 {
        WIDTH: 182px;
          position:static;
    }
    

    style.css

    #drop_nav .last {
        BORDER-BOTTOM: #fff 0px solid;
          position:static;
    }
    

    Btw 我刚刚在 IE8 6001 18720 & 上尝试过。您的网页完全没有问题。我不需要改变任何东西&它显示正常(没有编辑 css 或任何内容,只是访问了 url 并且它起作用了)。

    The issue also appears in IE 7.0.6002.18005, I don't have 8 but the following seems to work on for me locally and looks like it doesn't break Firefox so maybe it would work for IE8 as well but then again I don't know if its feasible for you or if it will cause you problems in future updates but its worth a shot:

    In the main page I replaced in a few tags :

    a) <div id="left_container" class="grid_1">

    with
    <div id="left_container" class="grid_1" style="position:static;">

    b) all occurnces of <li class="last">
    with <li class="last" style="position:static;">

    OR

    Find/replace following class & selector in external CSS as follows:

    960grid.css

    .container_5 .grid_1 {
        WIDTH: 182px;
          position:static;
    }
    

    style.css

    #drop_nav .last {
        BORDER-BOTTOM: #fff 0px solid;
          position:static;
    }
    

    Btw I just tried it on IE8 6001 18720 & there was no issues at all with your web page. I didn't have to change anything & it displayed ok (didn't edit the css or anything just visitied the url and it worked).

    你的心境我的脸 2024-10-17 08:47:08

    已知 IE 存在 z-index 错误,这与 960 网格无关。

    您可以为列表容器 (#left_container) 提供更高的 z 索引:

    #left_container {
        z-index: 999;
    }
    

    或降低 center_element 的 z 索引:

    #center_element {
        z-index: -1;
    }
    

    另请参阅:http://doctype.com/ie8-zindex-anomaly

    IE is known to have z-index bugs, this has nothing to do with 960 grid.

    You can either give the list container (#left_container) a higher z-index:

    #left_container {
        z-index: 999;
    }
    

    or lower the z-index for the center_element:

    #center_element {
        z-index: -1;
    }
    

    see also: http://doctype.com/ie8-zindex-anomaly

    面犯桃花 2024-10-17 08:47:08

    尝试也给“#drop_nav li”一个 z-index

    Try to also give "#drop_nav li" a z-index

    ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文