There is a lot of debate about whether you should use classes or IDs. Your decision should be based on the following:
So, if you need to use the same specific selector more than once, classes are a better choice.
You can use multiple classes to style an HTML element but you can only use one ID when styling an HTML element. This means that class selectors have a wider range of applications. An example of combining classes would be:
<p class="highlight indent">
.highlight { font-weight: bold; }
.indent { padding-left: 2em; }
There may be times when a declaration conflicts with another declaration. These conflicts are resolved using the Cascade rules. In simple terms, if a class selector and ID selector were to be in conflict, the ID selector would be chosen.
Other Max Design articles and presentations