内容IE7隐藏的CSS下拉菜单 [英] CSS Dropdown menu hidden behind content 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.com.au/dodgeball2012/about
the page can be found here: www.melbournedodgeball.com.au/dodgeball2012/about
任何帮助将非常感谢
推荐答案
Z-index上的CSS规范的段落表示,新的堆叠上下文仅针对具有z指数而不是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.
您在 #nav
中有一个位置的
,一个明显的IE将其解释为新的堆叠上下文。 li
相对
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
}
这篇关于内容IE7隐藏的CSS下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!