Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser compatibility of some type of css selectors

I would like to know if where is any browsers that does not support this kind of select?

1) .class-1.class-2
2) #id-1.class-2
3) .class-1 > .class-2
4) .class-1 + .class-2
5) .class[foo="bar"]

I do not have so many different OS with different browsers...So don't know where can find these compatibility. So please give me a hand!

like image 519
PeterWong Avatar asked Feb 10 '11 11:02

PeterWong


2 Answers

IE7 and newer, as well as all other browsers, support all your given selectors.

  1. IE6 reads .class-1.class-2 as .class-2 (see here for a comparison)

  2. IE6 parses #id-1.class-2 correctly

  3. IE6 cannot read >, ignores entire rule completely

  4. IE6 cannot read +, ignores entire rule completely

  5. IE6 cannot read [foo="bar"], ignores entire rule completely

like image 165
BoltClock Avatar answered Oct 14 '22 01:10

BoltClock


internet explorer 5 & 6 don't support >,+ and [attr] selector. More information at http://www.quirksmode.org/css/contents.html

like image 30
Sotiris Avatar answered Oct 14 '22 01:10

Sotiris