简体   繁体   中英

IE7 jquery z-index

Got a website with a menu going in front of a jquery slider. In IE7 the drop down menu goes behind the menu.

The website is: http://lkanlaeg.stom.dk/

What have i tried so far?

  • The jquery fix, which didn't work.
  • Positioning all top elements to "relative and" setting the z-index accordingly.

What would you suggest i try next? Repeat the positioning process? My code was something like:

#wrapper, .content-wrapper, #header-wrapper, #primary-menu, #new-royalslider-1, #primary-menu ul{
position: relative;
z-index: auto;

Plus

#primary-menu ul li ul{
z-index: 900;
position: absolute;

Am i wrong here?

The only "half solution" i have found is setting the z-index of the slider to -1 - that actually helps.. But i feel like its more of a last-option.

For the first content-wrapper on line 75 I added style="z-index:10;" and on the second content-wrapper on line 142 I added z-index:5; to the style block. This fixed it right up.

The top wrapper needs to be greater than the body, this will push the menu above everything. I tested this in browserstack and it works fine.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM