Multiple classes

I have never used multiple classes because I thought that the support not good with some browsers (IE). Well after some googling I found out that the support is really good. If you never heard of multiple classes it works like this:

  1. <p class="red bold">This text should be bold and red</p>

As you see there is two classes. Is really good when having alot of different situations of the same thing. Instead of:

  1. <p class="red">This text should be red</p>
  2. <p class="bold">This text should be bold</p>
  3. <p class="redbold">This text should be red and bold </p>

you can mix the classes, now I only used two rules, think if you had ten rules instead.

This do work in the major browser, IE5 to 6, Mozilla, Opera and Safari. For a complete chart have a look at this page. Multiple class chart

Related Posts:

  • None

External links

One Response to “Multiple classes”

  1. Groningen Says:

    It’s a nice way to keep your code clean and simple.

Leave a Reply


Jens Wedin Mail me Portfolio