Why is my CSS drop-down menu opening behind a DIV in IE7?

后端 未结 2 1197
小鲜肉
小鲜肉 2021-01-21 23:18

This issue has been stumping me.

This only happens in IE7. I saw some similar subjects, and tried the solutions, but couldn\'t get them to work.

Any ideas?

相关标签:
2条回答
  • 2021-01-22 00:12

    See: div layering problems

    The general idea is to poke position: relative (usually remove it) and z-index on parent elements of your drop down until it's fixed.

    I wasn't kidding about position: relative.

    You've obviously already read up on the problem you're experiencing and tried out the solutions; I can see z-index scattered around on various elements.

    There's one more step to fix the dropdown to work in IE7:

    • From #content, remove position: relative.
    0 讨论(0)
  • 2021-01-22 00:22

    Try this:

    #nav_main ul
    {
      overflow: auto;
    }
    
    #nav_main ul li
    {
      z-index: 10;
    }
    

    Another problem could be that the Flash video is doing it, but since I don't use Flash, I can't help much.

    0 讨论(0)
提交回复
热议问题