[SOLVED ]Horizontal menu-z-index issue - other links on page quit working

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
dhathy
Forum Members
Forum Members
Posts: 36
Joined: Wed Jan 17, 2007 12:20 pm

[SOLVED ]Horizontal menu-z-index issue - other links on page quit working

Post by dhathy »

On the horizontal menu, the sub menus show up ok in Opera and FF - after I added a z-index in the css.  This did not do the trick, however, for IE. But adding a z-index:-1; on my main container worked for all three browsers.

This created a new problem.  None of the other links in the body work at all.  Only links in the header work.

Anyone run into this?

the site:
www.reasonandsanity.com

yes, I have the IEscript included.  Could there possibly be something to add to the script?

The drop down is only on "Myth" menu item.
Last edited by dhathy on Fri Dec 19, 2008 1:29 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Horizontal menu-z-index issue - other links on page quit working

Post by Dr.CSS »

Did you have a problem when you first made the menu so you added z-index to it?...

I've done many many menus and have almost never ran into any problem that required z-index, only when I had something below it that had position: set or transparency of an image below it...
User avatar
dhathy
Forum Members
Forum Members
Posts: 36
Joined: Wed Jan 17, 2007 12:20 pm

Re: Horizontal menu-z-index issue - other links on page quit working

Post by dhathy »

Yes, I did have to set the z-index to get it to work - on any browser.
Here is the link to the template from which I started:

http://matthewjamestaylor.com/blog/ulti ... pixels.htm

CSS is available by viewing source. This is valid CSS but a little different approach to an equal height 3 column layout with no hacks.  I am pretty sure this is where the issue lies but have not come up with a solution. 

Of course, I am open to alternatives.

Thank you,

Dan
User avatar
dhathy
Forum Members
Forum Members
Posts: 36
Joined: Wed Jan 17, 2007 12:20 pm

Re: Horizontal menu-z-index issue - other links on page quit working

Post by dhathy »

I think I have narrowed this down a little: I need to set the z-index like this on the menu css

#primary-nav li li {
   margin-left: 0px;
   margin-top: -1px;
   float: none;
   position: relative;
z-index:100;
}

to have the  dd menu and all the links work in Opera and FF

If I set the z-index on this class, as shown, then the drop down works in IE but no links in the column container(.colmask) work.  They, the links, work in the head and footer and the section below the main content.  And this holds for all 3 browsers.

It is taking a z-index of -1 to get this to work in IE.  just a lower z-index than what I set in the menu css, has not worked.

/* column container */
.colmask {
position:relative; /* This fixes the IE7 overflow hidden bug */
clear:both;
float:left;
width:100%; /* width of whole page */
overflow:hidden; /* This chops off any overhanging divs */
border-bottom:1px dashed black;
z-index:-1;


As you can see, there is an element with position.  There are NO images here that should be affecting this.
Last edited by dhathy on Thu Dec 18, 2008 3:07 am, edited 1 time in total.
User avatar
dhathy
Forum Members
Forum Members
Posts: 36
Joined: Wed Jan 17, 2007 12:20 pm

Re: Horizontal menu-z-index issue - other links on page quit working

Post by dhathy »

You, Jeremy, are my new best friend!
I can mark this as solved

THANK YOU, he shouts from the roof tops
Post Reply

Return to “Layout and Design (CSS & HTML)”