0

I have 2 elements: a Dropdown Menu and an Images Slideshow.

The animations are done using jquery.

The problem I have (Only in IE7) is that the Dropdown Menu is cropped by the Images Slideshow.

I need the Dropdown Menu to be on top of the Images Slideshow.

In css I set the Dropdown Menu main div to: z-index: 9999 and the Images Slideshow main div to : z-index: 1

I similar problem this would be fix but not in this case. What can I do?

4

5 回答 5

1

z-index work with position

use also position like

 z-index:9999,
position:absolute
于 2013-11-11T11:47:25.963 回答
0

position : absolute; for the dropdown will do the trick

于 2013-11-11T11:47:58.250 回答
0

z index only works when you also give the position option (absolute, relative, fixed)

Older IE's also require the parents to get an z-index to correct it. In the example below you want the div that has no id, this is the highest possible in the example. If that is not an option, go for the next best thing (div#2 in the example)

<div>
    <div id="1" />
    <div id="2">
        <nav>Your menu</nav>
    </div>
    <div id="3" />
</div>
于 2013-11-11T11:54:04.313 回答
0

Be sure you thoroughly understand stacking contexts for z-index:

于 2013-11-11T11:55:38.973 回答
0

created jsfiddle here

If you don't have z-index for slideshow, things should work normally. Let me know if you have z-index for slideshow.

#dropdown {
    background-color:red;
    position:relative;
}

#dropdown .body {
    display:none;
    position:absolute;
    background-color:green;
    top:10px;
    left:0;
}

#dropdown.hover .body {
    display:block;
}


#slideshow {
    background-color:blue;
    height:300px;
}
于 2013-11-11T12:02:32.620 回答