我有一个下拉菜单,当在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后面
发布评论