cazlouise cazlouise - 1 month ago 14
HTML Question

Checkbox highlight not working when its checked

i have included some checkboxes within my html page so the user can check and uncheck them, i also wrote the style to highlight the checkbox borders and also the label but still nothing work.

can do with a bit of help.

<input type="checkbox" name="createartwork" id="createartwork">
<label class="label-for-check" for="createartwork">I want your Designer to create my artwork</label>


input[type=checkbox]:checked + label::after{
background-color: #FD6418;
}


input:checked {
height: 50px;
width: 50px;
}

Answer
 <input type="checkbox" name="createartwork" id="createartwork"> 
 <label class="label-for-check" for="createartwork">I want you  to create my artwork</label> 

:checked + label {
  background-color: #FD6418;
  font-weight: bold;
}

Try this.

Comments