I'm trying to make a custom checkbox in css but it doesn't seem to work properly.
My code
#checkbox1:checked + .checkboxOption::after {
display: block;
content:"";
position: absolute;
display: none;
height: 10px;
width: 10px;
border: white;
z-index: 2;
color: white;
}
.checkboxOption {
position: absolute;
margin: 0 10px;
height: 25px;
width: 25px;
background-color: #3B444B;
}
<div class="checkTitleText">
<input type="checkbox" checked="checked" id="checkbox1">
<label class="checkboxOption" for="checkbox1"><label></label></label>
<label class="checkboxTitle" for="checkbox1">Fight Park</label>
<div>
<span class="priceCheckbox">Price</span>
</div>
</div>
The original input is display:none
so I'm trying to make the label .checkboxOption
shown here instead
I think that it is somehow working but I don't see the result on my page. Is there a way I can test css as I would do with js ?