Dropdown menu, z-index problems
55,968
Solution 1
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).
Solution 2
Just add position: relative
, z-index won't work without position.
header ul {
display: inline-block;
float: right;
height: 30px;
z-index: 999;
position: relative;
}
Author by
user1505027
Updated on July 09, 2022Comments
-
user1505027 almost 2 years
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
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)
Thanks for help
-
dave over 4 years"You often need to set the z-index on the outermost parent" this is what helped me find the offending z-index, thank you!
-
vanarie over 2 yearsOld post, but something I missed again. I was changing the child element and never thought to set the parent. Thanks.