Andrew's Digital Garden

Selecting a range of n items in CSS

To make the 3-5th list items bold:

li:nth-of-type(n + 3):nth-of-type(-n + 5) {font-weight: bold;}

[[css]]

Selecting a range of n items in CSS