Z-index issue in IE for relative position element

2019-09-06 15:15发布

问题:

I am having a page with a drop down menu and images blocks beneath it. My menu and image blocks both applied position relative. Drop down of menu having z-index value of 9000, postion:absolute where as images are having z-index value of 1000.

When it comes to IE drop down menus are coming down to the blocks holding image, even though having greater value of z-index. On firefox it works perfect.

Any ideas why is this happening and what would be the solution for this?

If I remove the position:relative from the images it works perfect. But that is needed for me.

Check the attached image for a clear idea of the problem.

Thanks

回答1:

Try setting up the menu to absolute:

http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/