CSS下拉菜单隐藏在内容IE7后面

编程入门 行业动态 更新时间:2024-10-25 09:34:01
本文介绍了CSS下拉菜单隐藏在内容IE7后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个下拉菜单,当在IE7中查看时,被隐藏在主页面内容的后面。我试过改变z-index值,但没有运气。我也试过从这个网站的其他主题的建议,但没有一个工作。

I have a dropdown css menu that gets gets hidden behind the main page content when viewed in IE7. I've tried changing z-index values but have had no luck. I've also tried suggestions in other topics from this site but none have worked.

该页面可以在这里找到: www.melbournedodgeball.au/dodgeball2012/about

the page can be found here: www.melbournedodgeball.au/dodgeball2012/about

任何帮助将是非常感谢

推荐答案

CSS规范的Z-index段落说,新的堆栈上下文只创建一个z-index而不是auto的定位内容。

The CSS spec's paragraph on Z-index says that new stacking context is only created for positioned content with a z-index other than auto.

您有 li 里面 #nav 与位置:相对,显然是IE将其解释为一个新的堆叠上下文。

You have the li inside #nav with a position:relative, an apparently IE interprets this as a new stacking context.

尝试这样:

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

更多推荐

CSS下拉菜单隐藏在内容IE7后面

本文发布于:2023-11-23 04:36:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1620117.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:菜单   内容   CSS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!