My webpage features two radio buttons, "No" and "Yes," with the default selection being "No." I have implemented CSS styles for the checked elements, but they only work once physically selected. My goal is to apply these styles immediately on page load without requiring user interaction. Currently, I am facing difficulty in achieving this. Any assistance would be greatly appreciated.
HTML
<div class="split">
<input id="contact-no" type="radio" name="contact" value="No" checked="checked">
<label for="contact-no">No</label>
</div>
<div class="split">
<input id="contact-yes" type="radio" name="contact" value="Yes">
<label for="contact-yes">Yes</label>
</div>
CSS
.am-form input[type="radio"] + label:hover, .am-form input[type="radio"]:checked + label{background: rgb(239,58,65);}
Initial Page Load View: https://i.stack.imgur.com/Qel9t.png
Desired Page Load View and Selection Appearance: https://i.stack.imgur.com/xQI08.png