Style input label for radio and checkbox [RESOLVED]

I’ve previously used .my_custom_class .gfield_radio div input[type=radio]:checked + label to give a background color to selected radio choices. The inputs themselves are hidden. This seems no longer to be working, though I can style the labels with .my_custom_class .gfield_radio div label. This results in all the labels being the same background color. Anyone have an idea of how I can change the background color on the selected choice?

Try this:

.gform_wrapper .gform_body .gform_fields .gfield .gfield_radio input[type="radio"]:checked + label {
  background-color: red;
}

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.