I have successfully implemented the code for a radio button, and everything is working as expected
div > label {
margin-right: 80px !important;
box-shadow: .3rem .3rem .6rem #c8d0e7,
-.2rem -.2rem .5rem #FFFFFF;
position: relative;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 1.4rem;
height: 1.4rem;
border-radius: 50%;
}
div > label::after {
content: "";
position: absolute;
width: 0.6rem;
height: 0.6rem;
background: #9baacf;
border-radius: 50%;
transition: 0.3s ease;
}
div > label:has(input:checked)::after{
background: #6c7ae0;
}
div > label > input{
display: none;
}
div > label:hover::after{
background: #6c7ae0;
}
div > label > span {
color: #9baacf;
margin-left: 130px !important;
text-align: center;
}
div {
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
height: 82px;
margin-right: 15px;
margin-top: 25px;
font-size: 12px;
font-weight: 700;
}
<div>
<label>
<input type="radio" value="all">
<span>All</span>
</label>
<label>
<input type="radio" value="upcoming">
<span>Upcoming</span>
</label>
<label>
<input type="radio" value="expired">
<span>Expired</span>
</label>
</div>
I am having trouble identifying where there might be an issue, but I noticed some inconsistency in the spacing between the text and the circular buttons for all three options. My goal is to maintain a consistent margin of 10 pixels between the text element and the circular button.