下拉导航栏隐藏在IE7中的内容后面

时间:2012-08-14 17:16:43

标签: css internet-explorer-7

我有一个下拉导航栏,当您将鼠标悬停在项目上时,下拉选项会显示在IE7中,它们隐藏在滑块后面。

我试过z-index没有运气。此外,菜单按钮下方还有一些间距,IE7中也有第一个选项。我还没有尝试解决这个问题,我的主要担心是让它显示在滑块内容之上。

您可以在此处查看:http://www.condorstudios.com/stuff/temp/index.php

2 个答案:

答案 0 :(得分:2)

将此添加到您的$(document).ready()处理程序:

var zi = 1000;
$('*').each( function() {
    $(this).css('zIndex', zi);
    zi -= 10;
});

为了确保只在IE7上执行此操作,请在<script>标记外部标记:

<head>

答案 1 :(得分:0)

我解决了同样的问题recently here,所以这里有IE7的修复:

CSS

/* show menu above content */
#nav li {
    display: block;
    position: relative;
    z-index: 1;         // force IE to recognize stack at this point
}

/* normalize layout, IE7 not makes this automatically */
body,ul,li {
    margin:0;
    padding:0;
}
相关问题