[英]Dropdown menu, z-index problems
I've got a problem.我有问题。 I have a drop down menu, but the drop down list is always one layer behind the body although the z-index of menu is set to 999 and z index of body set to -999
我有一个下拉菜单,但下拉列表总是在正文后面一层,尽管菜单的 z-index 设置为 999,正文的 z 索引设置为 -999
Please chceck http://www.w3dominik.com/x/finemoney/ (the menu on top right, it says dropdown and should have 2 options, only 1 is now visible)请检查http://www.w3dominik.com/x/finemoney/ (右上角的菜单,它说下拉菜单,应该有 2 个选项,现在只有 1 个可见)
Thanks for help感谢帮助
This will fix it for you:这将为您修复它:
#header_wrap {
position: relative;
z-index: 10;
}
You often need to set the z-index on the outermost parent (particularly in older versions of IE).您经常需要在最外层的父级上设置 z-index(尤其是在旧版本的 IE 中)。
Just add position: relative
, z-index won't work without position.只需添加
position: relative
,没有位置 z-index 将无法工作。
header ul {
display: inline-block;
float: right;
height: 30px;
z-index: 999;
position: relative;
}
Can I bring this topic back? 我可以把这个话题带回来吗? I'm having the same problem here: https://www.carmelchamber.org/
我在这里遇到同样的问题: https : //www.carmelchamber.org/
When you type in the search bar, the results come up underneath the picture below. 当您在搜索栏中键入内容时,结果将显示在下面的图片下方。 I don't know what changed or how to fix it.
我不知道发生了什么更改或如何解决。 Can anyone help?
有人可以帮忙吗?
Thank you, 谢谢,
Luke 路加
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.