First reported by Herman Peet in Bradsoft's TopStyle newsgroups. Nick Bradbury posted about it in his blog.
3.6.2004
When the space is removed between the pseudo element and the first curly brace, the selector will not be applied. For example:
select:pseudo-element{ declaration }
^ space removed
To prevent the problem, ensure a space is added:
select:pseudo-element { declaration }
^ space preserved
Download example style sheet and example html file
I've tested this with the following browsers and so far, IE 6 is the only browser to exhibit the failure. Even IE 5.5 gets it right.
Changing DOCTYPEs seem to have no impact on the behavior.
There is one notable exception. A bare-bones HTML document without a DOCTYPE renders the pseudo elements correctly. (However other elements such as the width on the body fail. Quirks mode, I guess.)
View examples with various DOCTYPEs
p.broken:first-letter{font-size: x-large; font-weight: bold;}
p.working:first-letter {font-size: x-large; font-weight: bold;}
p.broken:first-line{font-size: x-large; font-weight: bold;}
p.working:first-line {font-size: x-large; font-weight: bold;}
Send comments, questions, critiques, links, etc. to jack at mvps dot org and I'll post them here.