After creating a customized radio button and checkbox button, everything looks fine in the css, but there is an issue with the functionality. When clicking on a radio button or checkbox, it does not register as the newly checked button. Can anyone assist me in identifying the problem?
CODE:
/** SIZE MODAL BUTTONS **/
.prod-desk-size-container {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding-left: 45pt;
position:relative;
float:left;
width:100%;
margin-bottom:20px;
}
.prod-desk-size-container input {
position: absolute;
opacity: 0;
cursor: pointer;
}
.gold-check {
position: absolute;
top: 0;
left: 20px;
height: 25px;
width: 25px;
cursor: pointer;
border: solid 1px #d9d9d9;
}
.gold-check:after {
content: "";
position: absolute;
display: none;
}
.prod-desk-size-container input:checked ~ .gold-check {
background-image: url('../images/icon-selected.png');
background-size: 100%;
border: 0px;
}
<div class="modal fade show" id="modal-desk-product" tabindex="-1" role="dialog" >
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">HAWAIIAN</h5><br>
<p class="modal-desc">Ham, pineapple,corn and mozzarella cheese</p>
<div class="btn-close" data-dismiss="modal"></div>
</div>
<div class="modal-body mb-2">
<h6 class="modal-desk-product-title font-weight-bold text-uppercase text-left">What size are you after?</h6>
<hr>
<div class="prod-desk-size row text-left" id="prod-desk-size" data-toggle="buttons">
<label class="prod-desk-size-container col-sm-6 font-weight-bold">Small
<input type="radio" name="prod-desk-size-radio" checked>
<span class="gold-check rounded-circle"></span>
</label>
<label class="prod-desk-size-container col-sm-6 font-weight-bold">Medium
<input type="radio" name="prod-desk-size-radio">
<span class="gold-check rounded-circle"></span>
</label>
<label class="prod-desk-size-container col-sm-6 font-weight-bold">Large
<input type="radio" name="prod-desk-size-radio">
<span class="gold-check rounded-circle"></span>
</label>
<label class="prod-desk-size-container col-sm-6 font-weight-bold">Seriously Large
<input type="radio" name="prod-desk-size-radio">
<span class="gold-check rounded-circle"></span>
</label>
</div>
</div>
</div>
</div>