A selector can contain more than one simple selector. Between the simple selectors, we must include a combinator—something that explains the relationship between the selectors. There are three different combinators in CSS2, and one extra in CSS3; when we use them, they change the nature of the selector to reflect one of the following types:
In this Section
- Descendant Selector
matches an element that’s a descendant of a specified element - Child Selector
selects an element that’s the immediate child of a specified element - Adjacent Sibling Selector
selects an element that’s an adjacent sibling to a specified element - General Sibling Selector
selects an element that’s a sibling to a specific element
No Reader comments