5

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!

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
PeterWong
  • 15,951
  • 9
  • 59
  • 68

3 Answers3

5

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

Community
  • 1
  • 1
BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
2

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

Sotiris
  • 38,986
  • 11
  • 53
  • 85
1

There is an extremely good site called Quirksmode.org which has a full set of compatibility charts for all CSS selectors and features.

http://www.quirksmode.org/css/contents.html

For what its worth, you'll have problems with almost all of those with IE6, but most other browsers will cope with them all just fine.

The solution: Don't support IE6.

Spudley
  • 166,037
  • 39
  • 233
  • 307