Click to See Complete Forum and Search --> : Is it OK to assign something two classes at the same time?


jammer20002
10-03-2004, 07:08 PM
Is it OK to assign something two classes at the same time?

i.e. class="class1 class2"?

I've seen it done and it certaly works when I test it.
But, I just want to make sure that it's 'OK' to do this.

Thanks.


Jam

Paul Jr
10-03-2004, 07:25 PM
Yup, it’s prefectly acceptable. ;)

baconbutty
10-04-2004, 09:58 AM
Also note that the priority is not determined by the order in the class attribute, but by the order in the stylesheet.

Thus

<style>
.class1{color:red;}
.class2{color:blue;}
</style>

<p class="class2 class1">My Text</P>

should I believe be blue.