CSS multiple classes

May 7, 2008, 12:30 pm

My jaw just fell off my mouth yesterday. I just couldn’t believe I missed this so many time. HTML supports many classes to a same element!

Yes you can call me a total newbea but I’m just astonished on how I missed this. You can actually give the same element multiple classes, just separate them by spaces. Like this:

<p class='classOne classTwo'>Lorem ipsum ...</p>

This increases flexibility so much I can’t even tell my boss how to not use this. My feelings for my team’s project grow stronger in the way I could incinerate it. They have so much redundance in their design that it scares the crap outta me. I’ll remind myself the next time I enter a big project like an online travel agency, loads of tables… :P
My bookmarks include the original post on CSS at Quirksmode. You should also read this if you want to apply this concept.

Comments

    There are no comments so far.

Post yourself a comment