Click to See Complete Forum and Search --> : Ie/ff


hooloovoo24
03-23-2005, 01:29 PM
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?

hooloovoo24
03-23-2005, 01:34 PM
Nevermind, I'm dumb.

Siddan
03-24-2005, 05:27 AM
what did you find?

hooloovoo24
03-24-2005, 11:42 AM
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.

MstrBob
03-24-2005, 12:16 PM
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: http://www.quirksmode.org/css/condcom.html

hooloovoo24
03-24-2005, 12:26 PM
Here's the file...

MstrBob
03-24-2005, 12:49 PM
Add:

position:relative;

to:

#nav, #nav ul {}

hooloovoo24
03-24-2005, 12:57 PM
wow, that's so great! Thanks so much, I can't believe it. I thought I had that already in there. haha thanks again.