A simple CSS solution to select ranges of content

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUIWeb Design7 min

About this video

Shows how to select a range of content in CSS by combining nth-of-type with counting backward, and introduces the nth-child "of type" syntax along with its browser support limits. It suits front-end developers and designers who already write basic CSS.

What you’ll learn

  • Select a range of sibling elements using nth-of-type
  • Count backward through elements with CSS selectors
  • Apply the nth-child of selector syntax and check its browser support