Do you use the child selector

The child selector is represented by the sign “>”. It allows you to target elements that are direct children of a particular element. For example, if you want to match all the h2 elements that are a direct child of your sidebar div, but not the h2 elements that may be also within the div, but that are grandchildren (or later descendants) of your element, you can use this selector:

1. div#sidebar > h2 {

2. font-size: 20px; 3 }

Ben

Hi, my names Ben and I’m traveling around the world with my bike, my paraglider and my laptop. Along the way I’m sharing the highs and lows of the life on the road. And my picks of the best places to bikepack, enjoy freeflight and work as a digital nomad. Each week I share a new video update, city guide or live streams with other adventurers I’ve met along the way.
Close Menu