So i have this assignment where i need to make a custom radio button that if checked then a success logo come out.
i succeed to create the box but not the content i first though its the real radio button not working but after i turn up the opacity(i use opacity to hide the real one in case this didn't clear enough) the real radio button work. i try asking my senior he didn't really answer my question
here's the html
<label for="Viridian">
<span class="checkbox"></span>
Viridian
<input type="radio" id="Viridian" name="color" value="Viridian" checked="checked">
</label>
and here's the css
.checkbox {
display: block;
width: 18px;
height: 18px;
cursor: pointer;
margin-right: 2vh;
border: solid 1px white;
}
input ~ .checkbox::after {
content: '';
vertical-align: middle;
font-size: 15px;
text-align: center;
}
input:checked ~ .checkbox::after {
content: 'a';
}