I wrote a few CSS rules for a page today and used the child selector “>”. It wasn’t absolutely necessary, but I like to be precise when I can to avoid unexpected side effects. It worked fine in Firefox, Safari and Chrome. When I went to test IE8, it failed; the attributes were not applied. According to Quirksmode and SitePoint’s CSS Concepts, it should work. I opened the IE8 Developer Toolbar and checked. The styles were being applied to the element according to the CSS window, yet they weren’t being applied to the actual rendering of the element. Very weird.
Eliminating the child selector causes the styles to be applied to the element. It doesn’t have any side effects that I can see, but I’d still like to know what’s going on.
The whole thing is probably moot, since IE6 doesn’t support the child selector and the client wants IE6 support. Maybe now that Google has dropped support for IE6, others will follow suit and I can stop dealing with that pain.