4.10 Child Selectors
There are still a few Mangie’s List CSS details that need to be covered. In this section, we tackle child selectors. In introducing child selectors, it’s helpful to compare them to descendant selectors. Remember how descendant selectors work? That’s when you have two selectors separated by a space, and the browser searches for a pair of elements that match the selectors such that the second element is a descendant of the first element (i.e., the second element is contained anywhere within the first element). A child selector is a more refined version of a descendant selector. Instead of allowing the second element to be any descendant of the first element, the second element must be a child of the first matched element ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access