IE中的样式问题-分层导航



嘿,伙计们,我有以下东西:

 <ul class='main_nav'>
        <li class='first' style='padding-top:0;'><a href='#' onclick='return false;'><span class='shaper'>Tools</span></a>
            <ul>
                <li class='second'><a href='emailfunction.php'>Email Tool</a></li>
                <li class='second'><a href='insurancetool.php'>Insurance Tool</a></li>
                <li class='second'><a href='monthlyreport.php'>Monthly Report Tool</a></li>
                <li class='second'><a href='statuschanger.php'>Status Change Tool</a></li>
                <li class='second'><a href='addtool.php'>Add Tool</a></li>
                <li class='second'><a href='revisetool.php'>Revise Tool</a></li>
                <li class='second'><a href='csvuploaderform.php'>Upload an Employee List (.csv file)</a></li>
                <li class='second'><a href='csvmanualuploaderform.php'>Upload a Single Employee</a></li>
                <li class='second'><a href='insuranceverificationviewer.php'>View Employee Car Insurance Information</a></li>
            </ul>
        </li>       
 </ul>

这是我的导航,下面是样式:

.main_nav {
    display: block;
    float: left;
    width: 118px;
    height: 60px;
    background: #009;
    margin: 0 .5% 0 0;
    padding:0;
    color:black;

}
.main_nav:hover{
    background: lightgray;
    border-top:1px solid #009;
    border-right:1px solid #009;
    border-left:1px solid #009;
    color:#009;
}
.main_nav .first {
    text-align: center;
    width: 100%;
    color:white;
    z-index:9999;
}
.main_nav li a {
    color:white;
    height:60px;
    display: block; 
    z-index:9999;
}
.main_nav a:hover {
    color:black;    
}
.main_nav li {
    list-style:none;
    z-index:9999;
}
.main_nav li:hover {
}
.main_nav ul {
    display:none;
    list-style:none;    
    position:relative;
    float: left;
    z-index:9999;
}
.main_nav li:hover > ul {
    display: block;
    padding:0;
    margin:0;
    position:absolute;
    background: lightgray;
    }
.main_nav  li ul li {
    border-left:1px solid #009;
    border-right:1px solid #009;
    border-bottom:1px solid #009;
    z-index:9999;
}

所以这很好,除了在IE中,我还有一个问题,那就是我有一个绝对的div,它在底部添加了一行。问题是在IE中这行被放在悬停时显示的顶部导航之前。在谷歌,firefox,一切都很棒。

这是酒吧:

<div class="top-backgroundwrap">
</div><!-- top-backgroundwrap -->
.top-backgroundwrap {
    width: 100%;
    height: 20px;
    background: lightgray;
    margin-top: -24px;  
}

我尝试过z索引,但没有成功。我注意到IE将其视为最普遍的立场:绝对;并且即使在使其索引减少之后也将其显示在前面。如果你能帮我一把,我将不胜感激。如果你还需要什么,请告诉我。

David

想好了。。。我必须去掉绝对位置,并在一个单独的IE样式表中更改一些填充。

相关内容

  • 没有找到相关文章

最新更新