Web Hosting Talk







View Full Version : Use of Contextual Selectors


seodevhead
03-29-2006, 09:03 AM
In CSS, is the descendant selector the only "contextual selector" that you can use in both Firefox and IE6? From what I am learning, it seems that child selectors, adjacent sibling selectors, etc are not interpreted in IE6.

It's a shame if this is the case. Should I just learn to write CSS using the descendant selector only... and simply wait for better cross-browser support in the future to add in these more advanced selectors...

..or is there a way I can use them now even with IE and other non-standards browsers? Thanks for your help!

the_pm
03-29-2006, 09:56 AM
Descendent selectors will take you 99% of the way anyway.

IE recognizes a very limited supply of contextual selectors. I believe it recognizes first-line, and maybe first-child, though I can't seem to get it work now (I swear I had it working at one time).

There are going to be some powerful selectors in CSS3, and we're going to have to wait 6-10 years to use them :(

NyteOwl
03-31-2006, 07:54 PM
20 or 30 if you wait for IE :D