Symptom:
Dropdown menus appear behind content in the div below even if z index is set higher.
Conditions:
CSS based dropdown menus viewed in IE7
Solution:
This occurs when the div containing the menu is separate from the div containing the content below. IE7 resets the z index for the separate divs. Adding “position: relative;” to both and a zindex to the div containing the menus that is higher thatn that for the content div will solve this.
| 01 | /*Set zindex of first div to be higher than div below so that |
| 02 | all zindex statements for elements in the first div are respected. |
| 03 | #navWrapper { |
| 04 | position:relative; |
| 05 | z-index:10; |
| 06 | } |
| 07 | #contentWrapper{ |
| 08 | position:relative; |
| 09 | z-index:1; |
| 10 | } |