Click to See Complete Forum and Search --> : IE6 and first-child


nnhubbard
07-07-2008, 04:28 PM
I realize that IE6 does not support the CSS first-child selector. I was just wondering if there was a work around for this, or a hack that would work to give IE6 the same functionality as other browsers have with first-child.

Using in all other browsers:

#subnav ul li:first-child a

I need to do something similar but only for IE6. I have seen some examples that use an expression in the ie6.css file, but I am not sure if that will work here.

Any ideas are appreciated!

Declan1991
07-07-2008, 05:02 PM
Easiest way (with the least hassle), is to use a class because generally it's only on one or two uls.

nnhubbard
07-07-2008, 05:06 PM
Easiest way (with the least hassle), is to use a class because generally it's only on one or two uls.

Well, in our case it is about 60 different uls! :)

Declan1991
07-07-2008, 05:43 PM
How important is it? You can use JavaScript to add the class, and then it will work in all browsers, except IE 6 and less with JavaScript disabled.