I have a checkbox and i would like to style it. When the checkbox is unchecked it should have a black border and when the checkbox is checked the hole checkbox should be black without hook. Below you see what i have done so far. Sadly it wont work.
My Code:
<form>
<input class="newsletter" type="checkbox" value="text">Ich möchte den Newsletter bekommen
</form>
input[type=checkbox]:not(old){
width : 13px;
margin : 0;
padding : 0;
opacity : 0;
}
.newsletter:unchecked{
width:13px;
height: 13px;
border: 2px solid black;
border-radius:3px;
}
.newsletter:checked{
width:13px;
height: 13px;
border: 2px solid black;
background-color:black;
border-radius:3px;
}
The first part of my code should hide the current checkbox. The second part should be the checkbox when the box is unchecked and the third part when the box is checked. I thought this is how you are styling these checkboxes. What am i doing wrong?