Ie/ff

I have a CSS menu and in Firefox, if I add a z-index to it, it messes up, but in IE if I don't have a z-index with it, it messes up. So is there a way to add it JUST for IE?Nevermind, I'm dumb.what did you find?That I misdiagnosed the problem. It still doesn't work, but it's not because of the z-index. I actually don't know what it's from now.If you post the code we could perhaps give you hand, or provide an example page. And there are numerous methods for targetting IE-only. One method I use if I can't avoid it, is this:

* html desired_element {

}

For instance, say I want to assign a height to a <div> with an id of 'bob'. But I need a different height in IE for it to work. My CSS would be as such:


#bob {
height:200px;
}

* html #bob {
height:210px;
}


This is because IE seems to believe there is an element around the HTML element. Other browsers realize HTML is the root element and don't apply it. Also, if you need to target specific IE versions, or merely another method are IE conditional comments.


<!--[if IE]>
HTML code here
<![endif]-->


You can also target IE versions:


<!--[if IE 6]>
<p>You Are Using Internet Explorer 6.</p>
<![endif]-->
<!--[if gte IE 5]>
<p>You Are Using IE version 5.0 or greater.</p>
<![endif]-->


See here: <!-- m --><a class="postlink" href="http://www.quirksmode.org/css/condcom.htmlHere's">http://www.quirksmode.org/css/condcom.htmlHere's</a><!-- m --> the file...Add:

position:relative;

to:

#nav, #nav ul {}wow, that's so great! Thanks so much, I can't believe it. I thought I had that already in there. haha thanks again.
 
Back
Top