Classes and IDs

I think I’ve finally nailed down when to use CSS IDs and classes. IDs are for when you need to identify a unique object that exists only once in your design. Classes are for styling multiple instances of something. By fixing that one little problem, I’ve decreased my number of w3c validation errors from 55 or so down to 24.

[tags]css, id, class[/tags]


Leave a Reply

Your email address will not be published. Required fields are marked *