CSS Selector tests (XHTML standards mode)

(complicated and should probably be separated on a couple of pages, so take it with a grain of salt!)


following: div>p>b, div>p>i, div>p>.x

CSS selector with space

spaces between simple selectors separated with comment or the universal * between two simple selectors

works in all browsers as expected (text is green)

div/**/ b space after comment!
div * i spaces around *
div * .x spaces around *, *.x would mean somthing different anyway

no space

No spaces if selectors separated by comment or universal * preceding/following

Works (FALSELY!) in IE (at least until 7) and Safari( tested in v3.04) only (text is RED!), Firefox and Opera parse this according to the spec which says the space MUST be present!

div/**/b div and b only separated by comment but IE treats it as SPACE
div*i no spaces around * but IE treats "*" as SPACE
div* .x no space before *

Spec compliant browsers see the following:

div*.a (inside span.a (inside span.a)) (FF/Opera ignore this completely rendering it black, IE in pink and therefor sees div .a)
div/**/.ab (all browser see it as div.ab and therefore render it green)