Click to See Complete Forum and Search --> : Dare I believe my eyes?


Mr Initial Man
03-26-2009, 07:39 PM
Does IE 7+ indeed support [attribute] CSS selectors?

What I did was I had a page that had the following rule:


[lang]{color:red; font-style:italic;}
[lang="en"]{font-style:normal;}


To my COMPLETE surprise, when I checked it on Browsershots.org, IE 7 and 8 showed both q elements that HAD a lang attribute as BRIGHT RED! IE8 even showed quotation marks!

Jeff Mott
03-27-2009, 01:55 AM
Does IE 7+ indeed support [attribute] CSS selectors?

In most cases, it seems to. But, of course, IE6 doesn't support it at all. And since IE6 still has anywhere from 20-35% of the market (depending on where you get your stats), we still need to write code that will work in IE6.