[web] Problem with some CSS in IE

Started by
1 comment, last by xstreme2000 17 years, 4 months ago
I'm having a bit of trouble with some CSS, it works in Opera & Firefox but not in IE (surprise surprise, althought I've not tried IE7). This CSS code looks something like this... /* -----------------------*/ li { background-color: black; /* All list elements in IE have this style */ } ul > li { background-color: red; } ul > li + li { background-color: orange; } ul > li + li + li { background-color: yellow; } /* etc... */ /* -----------------------*/ So I'm trying to change the style of each list item. Any ideas on getting this to work in IE?
Advertisement
Simply, IE6 doesn't support > or + selectors.

As for getting it to work under old versions of IE, I can't suggest anything beyond marking each list item with a different class or specifiying the colour inline. You'd hope everyone was using 7, but there are still those at businesses or those on Windows 2000 stuck on version 6.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Ok thanks. Sadly I've not got the option to individually class each item as the html is generated by some other software which I'm not going to start modifying. I'll just pick a nice style for the default list item and let IE display that.

Thanks again.

This topic is closed to new replies.

Advertisement