vendredi 18 mai 2018

Change colour of div, that contains label + input, when checkbox is not :checked - without JS? [duplicate]

This question already has an answer here:

First of all, thanks for reading. I'm not english-native speaking, but I will try to express clearly.

I have three ckeckboxes in a form, every checkbox with their label inside a div. The last of them is :required, when not :checked it's possible to change background of div without using JS? Only CSS, and without having to use Pure or Bootstrap.

<form>
  <div class="checkbox">
    <input id="com1" type="checkbox" required>
    <label for="com1">Bla Bla (...)</label>
  </div>  

  <button type="submit">SEND</button>
</form>




Aucun commentaire:

Enregistrer un commentaire