CSS Skillz

Design Monday 20th September 2004

A while ago at work my colleague Alex discovered something in css that none of us knew.

When assigning a class to a div like so:

<div class="blah">...</div>

You can choose more than one class:

<div class="blah anotherclass andanotherclass">...</div>

This is incredibly helpful at times. I even used it in the re-design of the site here. The rollover images down at the bottom use this technique. There is a generic class that does the rollover background image changes and then more specific classes so that the image to use can be specified. Neato stuff.

 

No comments yet