Z-Index未应用

时间:2013-10-29 19:08:39

标签: html css z-index

我正在尝试从我的页面顶部下拉滑块以查看我的菜单但不能。

我已经应用了一个位置:相对于它们两个并试图将菜单的z-index设置为0或-10而我有滑块到z-index:10000它也有位置:相对但它是仍然在菜单后面。

页面位于http://www.tassolarpanels.com.au/,有问题的滑块是屏幕右上角的蓝色“获取快速报价”按钮。当你按下它时会看到它 - 它在我的菜单后面。

如果有人有任何想法我做错了什么我会非常感谢你的帮助!

3 个答案:

答案 0 :(得分:1)

您需要确保父元素(在本例中为#sliding-panel-container)具有正确的z-index,它当前没有应用 - 它被列为z-index: 1这就是为什么它显示在列为z-index: 2的导航后面。

试试这个:

#sliding-panel-container {
    ... /* Whatever your other CSS is here */
    z-index: 3;
}

答案 1 :(得分:0)

添加到.site班级:

position: relative;
z-index: 0;

答案 2 :(得分:0)

#sliding-panel-container {
    display: table;
    position: relative;
    width: 100%;
    z-index: 9999;
}