Chapter 6. Style Specific Elements

In previous chapters, we’ve seen how we can select and style elements by XHTML tag name, by class, by id, and by elements that are inside other elements. Those methods of selecting will suffice in many, if not most cases. But sometimes, you need to zero in on particular elements on a page in order to style them. For example, you might want to style alternating rows in a table, as shown on this page. Or you might want to change the first letter in a paragraph to give the effect of a drop cap. Using CSS, you can get as specific as you like about the page elements you want to style.

You may or may not use all of the ...

Get Styling Web Pages with CSS: Visual QuickProject Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.