尝试了“一切”。我的菜单一直位于 IE6 中我的特色滑块后面。 (CSS z 索引?)
尝试了一切,我的下拉菜单在 IE6 中一直位于滑块后面。请参阅此处:
在 IE6 中查看,菜单位于滑块后面。 (这是一个用于测试目的的模型站点,上面没有什么重要的东西。)
我尝试将滑块放在 z-index:-1,位置:相对...什么都没有,尝试摆弄菜单。没有什么。
我现在只是坐在这里,敲击键盘,盯着屏幕。任何帮助将不胜感激。
以下是一些背景信息: 它在 wordpress 上运行,主题为:新闻。 (http://devpress.com/themes/news/)
滑块是“Simple Nivo Slider”,一个 WP 插件:(http://wordpress.org/extend/plugins/simple-nivo-slider/)
编辑:已解决(论坛不允许我回答我自己的帖子。
我使用了这个。
.menu{
position: relative;
z-index: 5;
}
#container{
position: relative;
}
Tried everything, my dropdown menu keeps going behind my slider in IE6. See here:
View it in IE6, and the menu goes behind the slider. (That's a mock-up site for testing purposes, nothing important on there.)
I tried putting the slider at z-index: -1, position: relative...nothing, tried fiddling with the menu. Nothing.
I'm at the point where I'm just sitting here, smashing keys, staring at the screen. ANY help would be much appreciated.
Here is some background info:
It's running on wordpress, with the theme: News. (http://devpress.com/themes/news/)
The slider is "Simple Nivo Slider", a WP plugin: (http://wordpress.org/extend/plugins/simple-nivo-slider/ )
EDIT: SOLVED (the forum wouldn't let me Answer my own post.
I used this.
.menu{
position: relative;
z-index: 5;
}
#container{
position: relative;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在任何情况下我都不会使用负 z 索引。它将阻止某些事件在元素上触发。对于需要位于前面的元素,始终使用正 z 索引。
I would't use negative z-index in any circumstance. It will prevent some events from being fired on the element. Always use positive z-index for the element which needs to be in front.
检查将其添加到 header.php 的顶部,
否则尝试将其添加到标头中
check adding this at the top of your header.php
otherwise try adding this one in your header
所以我注意到滑块中的锚标记具有正 z-index 值(5、6、8 等)。您是否尝试过为菜单元素提供足够高的 z-index?另外,这里只是在黑暗中拍摄,您可以尝试为菜单和滑块元素提供
zoom: 1
。这不会影响元素的放大倍数,但会给它们提供hasLayout
属性,众所周知,该属性可以修复 IE 中的这些小问题。So I notice that the anchor tags in your slider have positive z-index values (5, 6, 8, etc.). Have you tried giving your menu elements a generously high z-index? Also, just a shot in the dark here, you might try giving both your menu and your slider elements
zoom: 1
. This won't affect the magnification of your elements, but it will give them thehasLayout
property, which has been known to fix little quirks like these in IE.