Internet Explorer 7 CSS 菜单定位
我用 HTML 和 CSS 创建了一个适用于所有主要浏览器(Chrome、Firefox、IE8+ 和 Safari)的菜单。您可以在这里找到它:http://www.calvaryccm.com/MenuTest.aspx
IE 7 中出现问题。
我有一个悬停菜单,使用一些 JS 来实现效果。当我尝试在 IE7 中渲染它时,会发生以下情况:
我需要一些帮助来确定如何定位文本下方的菜单。感谢您的帮助!
I have created a menu in HTML and CSS that works in all the major browsers (Chrome, Firefox, IE8+, and Safari). You can find it here: http://www.calvaryccm.com/MenuTest.aspx
The problem occurs in IE 7.
I have a hover menu using some JS for effect. When I try to render it in IE7 this is what happens:
I need some help figuring out how to position the menu under the text. Thank you for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定您是否想在下面的选择器中使用
.block
还是.nav
。我选择了.block
因为我可以看到它被应用到元素上。.block ul
上,删除overflow:hidden
。.block li
上,添加position:relative
。.block ul.nav ul
上,添加left: 0
。您现在拥有臭名昭著的IE6/7
z-index 问题
:
.block ul
上添加position:relative; z 索引:3
。z-index: 3
比#player-area
上的z-index
高 1。I'm not sure whether you want to use
.block
or.nav
in the selectors below. I've gone with.block
because I can see it being applied to the element..block ul
, removeoverflow: hidden
..block li
, addposition: relative
..block ul.nav ul
, addleft: 0
.You now have the infamous IE6/7
z-index
problem:.block ul
, addposition: relative; z-index: 3
.z-index: 3
to be one higher than thez-index
on#player-area
.另外,您不需要像您所做的那样使用 javascript 添加“hover”类。只需在 CSS 中使用
:hover
伪选择器即可:Also, you don't need to use javascript to add the 'hover' class as you've done. Just use the
:hover
pseudo selector in CSS: