This question already has an answer here:
- Is there a CSS parent selector? 16 answers
I need to select a label of a checked checkbox. This would be super easy if the label was underneath the checkbox. One could use the + selector then.
But what about a structure like this:
<label>
<input type="checkbox" checked>
</label>
Am I right that it turned impossible now to select the label of the checked input with pure CSS?
Seems odd to me because I like the above structure more.
Aucun commentaire:
Enregistrer un commentaire