Browser compatibility of some css selectors

I would like to know if there are any browsers somewhere that do not support this kind of choice?

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 many different OS with different browsers ... Therefore, I do not know where to find this compatibility. So please give me your hand!

+5
source share
3 answers

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

  • IE6 reads .class-1.class-2like .class-2(see here for comparison)

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

  • IE6 cannot read >, completely ignores the complete rule

  • IE6 cannot read +, completely ignores the complete rule

  • IE6 cannot read [foo="bar"], completely ignores the complete rule

+5
source

Internet explorer 5 6 >, + [attr]. http://www.quirksmode.org/css/contents.html

+2

There is a very good site called Quirksmode.org that has a complete set of compatibility diagrams for all CSS selectors and functions.

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

For what it's worth, you will have problems with almost all of them with IE6, but most other browsers will cope with them all right.

Solution: do not support IE6.

+1
source

All Articles