The child selector (>) and spaces around it

Test: A colored line.

Code

p#test { color: #f00; }
body > p#test { color: #0f0; }
body>p#test { color: #00f; }

What happens?

In Internet Explorer 5 the line is green.

In Internet Explorer 5.5 and 6 the line is red.

In Mozilla and Opera the line is blue.

So?

Internet Explorer 5 applies body > p#test, but doesn't apply body>p#test. IE 5.5 & 6 don't apply both.


Home - More stuff