Suckerfish Menu IE6 之子 - 隐藏在内容后面的菜单
页面 - http://blu-eye.com/index.html - 包含 suckerfish 菜单,其中除此页面外,网站的其余部分均能正确显示。菜单项隐藏在下面的内容后面。
它下面的内容包含一个带有图像和文本的 JavaScript 滑块。我已经尝试更改大多数元素的 z 索引,但仍然没有运气。
它仅出现在 IE(6 和 7)中。
请帮忙!
Page - http://blu-eye.com/index.html - contains suckerfish menu which is displaying correctly on the rest of the site, except for this page. The menu items are hidden behind the content below.
The content below it contains a javascript slider with image and text. I've tried changing the z-indexes on majority of elements, but still having no luck.
It only occurs in IE (6 and 7).
Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您所遇到的戏剧性问题是使用相对定位元素,这会在 << 上重置 z 顺序上下文。 IE8。
特别是在 div#header 上,删除相对位置。然后在 div#cat_528463_divs > ul> li 设置 z-index(例如 1000)。这将解决隐藏在 JS 滑块下方的导航问题 - 但是它会搞乱顶部其余部分的外观,因为它们绝对定位徽标和其他一些图像。所以这需要重建。
The drama you have is the use of relative positioned elements, which reset the z-order context on < IE8.
Specifically on div#header, remove the position relative. then on div#cat_528463_divs > ul > li set a z-index (of 1000 for eg). This will fix the nav issue from tucking in under the JS slider – however it will screw up the look of the rest of the top section, because they are absolutely positioning the logo and some other images. So that is going to need to be rebuilt.
IE 的元素堆叠顺序略有不同,因此仅设置不同的 z-index 并不一定会将其移至上方。
将起点作为包装器,添加position:relative 到它,然后深入到您的HTML 中。如果您在起点想象这一点,那么您需要使菜单 div 和滑块 div 至少达到相同的“深度”。
您可能会发现添加position:relative到#content也可能有所帮助。
然后您可以更改 z 索引。
IE has a slightly different stacking order of elements so just setting something with a different z-index will not necessarily move it above.
Taking your starting point as your wrapper, add position:relative to it and then work down into your HTML. If you imagine that at your start point, then you need to get your menu div and your slider div to at least the same 'depth'.
You might find adding position:relative to #content as well might help.
You can then change the z-indexes.
将
z-index:100
添加到子菜单的 li 中Add
z-index:100
to the submenu's li's我发现 jQuery 的这一点对于您的问题非常方便:
http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/
I found this bit of jQuery very handy for your problem:
http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/