samedi 25 avril 2015

Select label of a checked checkbox that is wrapped over the checkbox with pure CSS [duplicate]

This question already has an answer here:

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