IE7 dropdown menu appears behind image

萝らか妹 提交于 2019-12-11 01:14:47

问题


I have created this css3 dropdown menu that appears behind the image when I mouse over the dropdown menu, and I have tried to figure it out. But cant for the life of me. Any help is greatly appeciated you can take a look at it here.


回答1:


Quoting from this thread

Z-index is not an absolute measurement. It is possible for an element with z-index: 1000 to be behind an element with z-index: 1 - as long as the respective elements belong to different stacking contexts.

When you specify z-index, you're specifying it relative to other elements in the same stacking context, and although the CSS spec's paragraph on Z-index says a new stacking context is only created for positioned content with a z-index other than auto (meaning your entire document should be a single stacking context), you did construct a positioned span: apparently IE interprets this as a new stacking context.

UPDATE-

Add the following css to you page

#header
{
    position:relative;
    z-index: 2;
}
#content-wrap
{
    position:relative;
}



回答2:


I think either of these will explain the problem and give a solution:

  • http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/
  • IE7 Z-Index Layering Issues



回答3:


Give ".nav" and "content" a z-index. Make .nav higher.



来源:https://stackoverflow.com/questions/3790305/ie7-dropdown-menu-appears-behind-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!