Skip to content Skip to sidebar Skip to footer

What's The Support For .classname.andclassname In The Current Browsers?

Confusing title? Sure! In CSS, you can specify: .button.blue { ... } Which will target elements that have both class names. Does anyone know what the browser support is?

Solution 1:

I've never seen chaining of modifiers fail. I think you're good to go in all browsers still in use today, if not all browsers that ever implemented CSS.

EDIT: Nope. Just watched IE6 choke on it. Plugged this example into Adobe Browserlab, and both the class attributes hello world and world respond to the .hello.world selectors.

Booooo, IE6. IE7 is good to go on that point, though.

Here's a blog post describing the issue (IE just reads the last class, it would seem), and offering the following stupid but necessary fix if IE6 is required: <p class="one two one-two">

Post a Comment for "What's The Support For .classname.andclassname In The Current Browsers?"