Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 402 Bytes

descendantCombinator.md

File metadata and controls

13 lines (8 loc) · 402 Bytes

Descendant combinator

The descendant combinator is usually represented by a simple white space between two selectors so that the elements matched by the second selectors are only selected if their ancestor is an element matching the first selector.

/* style applied to list elements inside an unordered list with a class of 'my-list' */
ul.my-list li{
  background-color: pink;
}