CHAPTER 13

image

Using Advanced Selectors

Chapter 2 introduced you to the 16 most commonly used selectors. Along the way, you’ve also been introduced to two more: the :first-child pseudo-class and the child selector. In this chapter, it’s time to get up to speed with the remaining CSS3 selectors. There are another 24 in the CSS3 Selectors module, and even more have already been proposed for CSS4. You might be wondering why so many selectors are needed.

A fundamental principle behind CSS is the separation of content from presentation. If you rely all the time on using classes or ID selectors to mark up how your web pages should be presented, the separation ...

Get Beginning CSS3 now with O’Reilly online learning.

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