On this MS compatibility table it says, IE9 does not support pseudo-elements ::before and ::after, but when I try it seems it does… see JSBin
Am I doing something wrong? I thought ::before and ::after would be nice tools to hide stuff from IE9, when in fact, they don’t.
The CSS2 pseudo-elements
:beforeand:after, with the traditional single-colon notation, are supported by IE8 and later. They are not new to CSS3.The double-colon notation, on the other hand, is new to CSS3. IE9 does support this new notation for
::beforeand::after, and likewise for the CSS1 pseudo-elements::first-lineand::first-letter. Going forward, however, no new pseudo-element may use the single colon syntax, and browsers (including IE) are expected to support the double colon syntax for all pseudo-elements.I have no clue why that table says IE9 doesn’t support the new pseudo-element syntax, because it certainly does according to the docs for the individual selectors linked above, and your test case. As well as, of course, this answer.