April 2005
Intermediate to advanced
336 pages
6h 33m
English
Of course, using a lot of classes means not only writing more CSS rules, but also adding numerous class attributes to the HTML. If you have a lot of content to style and you rely too much on classes, it'll result in what industry specialists refer to as “class-it is,” the overuse of classes. You can avoid this by tapping into other kinds of selectors.
Elements can be uniquely identified using what's known as an ID selector. These selectors start off with an octothorpe followed by a custom name—very similar to what you do when creating a class:
#id-name
The difference between class and ID selectors is a critical one. Class selectors can be used as many times in a document as you desire, whereas ...
Read now
Unlock full access