z-index with position absolute vs. IE

2019-07-20 09:21发布

Can someone please help me with this problem i am having with my menu ? THe problem is only in IE in compatibility mode. I have the menu with position absolute and z-index 99999999 but still the menu is hidden behond the content. Please check :

http://www.tomasdostal.com/projects/modul16/draft2/?page=buildings

Thanks for any advice

2条回答
Rolldiameter
2楼-- · 2019-07-20 09:45

I have the menu with position absolute and z-index 99999999

You need to use an even higher z-index!

 

 

..just kidding.

IE in compatibility mode = IE7.

IE7 has known bugs with z-index, see: IE7 Z-Index issue - Context Menu

In this specific instance, one way to fix it is to add z-index: 1 to the <div class="grid_3"> that is a parent of your menu.

查看更多
我想做一个坏孩纸
3楼-- · 2019-07-20 10:04

Z-index only works with absolute positioning (the element is currently positioned relative to it's parent element). Add the following CSS to .menu_wrap.

position: absolute;
top: 0;
left 0;
查看更多
登录 后发表回答