-2

This is my CSS snippet:-

.radio label {
    color: blue !important;
}

This is how the HTML is:-

<label for="contactmethod_delivery" class="radio tg-control-label">Delivery</label>

But the output label is still not as per the color defined in the CSS...

Screenshot of the label

I hope I am not missing any information required. Please let me know if I did. Thank you.

Reporter
  • 3,897
  • 5
  • 33
  • 47
burf
  • 25
  • 1
  • 7

3 Answers3

0

Try this only radio is the class of label

.radio {
    color: blue !important;
}
Umair Mehmood
  • 514
  • 1
  • 11
  • 24
0

You need to check how you select in CSS. Check CSS-Selectors.

In this snippet you select all labels with the class radio.

label.radio {
  color: blue !important;
}
<label for="contactmethod_delivery" class="radio tg-control-label">Delivery</label>
MrMaavin
  • 1,611
  • 2
  • 19
  • 30
0

$( "ancestor descendant" );

A descendant of an element could be a child, grandchild, great-grandchild, and so on, of the ancestor element. So, your Code tries to find label child or grand-child of a element having class="radio".

label.radio {
  color: blue !important;
}

Don't separate your selector with comma, if both of your selector is within the same element.

Sushil
  • 1,111
  • 1
  • 10
  • 23