CSS allows us to select a parent or sibling of an element by taking a relative selector list as its argument. In practice, we can select any element in the DOM relative to another, as long as they share a common ancestor. This makes it pretty powerful. Hiding and revealing content is often something that should be done with JS.
Sort: