Nivo Slider隐藏我的CSS菜单

时间:2011-09-02 02:15:37

标签: jquery html css nivo-slider

看到之前已经问过这个问题,但我无法使用所提供的解决方案;

该网站为http://digitalstr.com

我已将所有菜单上的z-index更改为99999,但仍然低于此值。

<div id="slidercont"> 
<div id="slider"> 
        <img src="http://digitalstr.com/wp-content/uploads/2011/09/ibfconpromo.png" /> 
    <img src="http://digitalstr.com/wp-content/uploads/2011/09/irconspacepromo.png" />
</div> 

#access {
    background: #3b95bd; /* Show a solid color for older browsers */
    clear: both;
    display: block;
    float: left;
    margin: 0 auto 6px;
    width: 100%;
    z-index: 99999;
}
.menu {
    margin-top:-20px !important;
    z-index: 99999;
}
#access ul {
    font-size: 13px;
    list-style: none;
    margin: 0 0 0 -0.8125em;
    padding-left: 0;
    z-index: 99999;
}
#access li {
    float: left;
    position: relative;
    z-index: 99999;
}
#access a {
    color: #eee;
    display: block;
    line-height: 3.333em;
    padding: 0 1.2125em;
    text-decoration: none;
    z-index: 99999;
}
#access ul ul {
    -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    display: none;
    float: left;
    margin: 0;
    position: absolute;
    top: 3.333em;
    left: 0;
    width: 140px;
    z-index: 99999;
}
#access ul ul ul {
    left: 100%;
    top: 0;
    z-index: 99999;
}
#access ul ul a {
    background: #f9f9f9;
    border-bottom: 1px dotted #ddd;
    color: #444;
    font-size: 13px;
    font-weight: normal;
    height: auto;
    line-height: 1.4em;
    padding: 10px 10px;
    width: 120px;
    z-index: 99999;
}

3 个答案:

答案 0 :(得分:2)

z-index仅适用于定位元素,因此请尝试使用z-index设置position:relative。

更新:试试这个:

#branding {
border-top: 2px solid #BBBBBB;
padding-bottom: 10px;
position: relative;
z-index: 2; // REMOVE THIS LINE
}

答案 1 :(得分:1)

每个元素都应该设置position:relative或position:absolute使用z-index

尝试在http://digitalstr.com/wp-content/themes/twentyeleven/nivo-slider/nivo-slider.css

更改您的css文件
#slidercont { 
width: 929px;
margin: 0 auto;
height: 260px; 
z-index:10; 
position:relative ; //or  position:absolute
} 

答案 2 :(得分:0)

它对我有用

.nivoSlider {
    position:relative;
    width:100%;
    height:auto;
    overflow: hidden;
    z-index:-50;
}