When deciding whether to use a class or an ID, follow these rules of thumb:
To use a style several times on a page, you must use classes. For example, when you have more than one photo on your page, use a class selector to apply styling—like a border—to each <img> tag you wish to style.
Use IDs to identify sections that occur only once per page. CSS-based layouts often use ID selectors to identify the unique parts of a web page, like a sidebar or footer. Part...
class and id selectors
Share this highlighthttp://www.safaribooksonline.com/a/css-the-missing/26437/