Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Change background color of CSS tab label Reply To: Change background color of CSS tab label

#240499
Beverleyh
Participant

There is no parent, or previous sibling selector in CSS.

The general sibling selector (~) matches elements that are siblings of a given element, that come after it in the markup. It can’t go backwards/up the DOM.

To achieve what you’re describing you would either need to change the markup so that the label comes after the radio, or use JavaScript.