views:

47

answers:

5

OK, so I had this issue with my jQuery subnav in IE7 where it was scrolling down behind the main content after the header. Did a fair bit of research and found a great fix involving simply applying a z-index value to the header, and one to the main content.

All was well. Or so I thought.

Turns out IE7 is still messing up the subnav z-index within the header itself. The subnav still drops down behind the tagline, which is also part of the header. Particularly when you hit the subnav on the "Help Now" tab. (again, IE7 only)

http://betawww.helpcurenow.org

I've applied z-index values to both the subnav and the tagline, but that did not resolve the issue as did adding z-index values for the header and maincontent divs.

Any tips? Did I specify my z-index improperly with the subnav? (should I have applied to the parent element?)

A: 
<div id="maincontent" style="z-index=-1" class="container960"></div>

Might create some problems with links in maincontent at that point, but you can issue fixes from there.

Mike Dyer
The tagline is actually part of the header (logo, nav, and tagline), so changing the z-index on the main content didn't make a difference.
JAG2007
A: 

Some of the HTML controls are rendered by IE as "windowed", that is, not respecting z-index. I don't know about IE7, but for older IEs the selectbox and iframe, for example, were windowed.

Pavel Radzivilovsky
A: 

try:

#header #nav {position:relative; z-index:9000;}

and

#header #tagline {position:relative;}

I think older IE has a problem with z-indexes because they reset stacking order with items that share parents.

edl
I didn't use your solution, but instead I just changed the tagline z-index to a -1. that worked. But I'm pretty sure your solution would also have worked. Its just that I am already using another similar hack to fix the same issue with the header and the main content.
JAG2007
+1  A: 

Have you tried making the z-index on header higher than the z-index on nav e.g.:

#header
{
  z-index: 5000;
}

#nav
{
  z-index: 2000;
}

?

More info here

Hooray Im Helping
A: 

I had to change the z-index on the #tagline to -1. Changing the z-index on the header was problematic mainly because I was already using a hack to keep the subnav from going behind the main content too.

JAG2007