I think this is a pretty simple thing to do, but I don't know h开发者_开发问答ow.. thus I'm here. I have written a simple HTML form and need to change the color of the text on a Radio Button. Anyone have any ideas on how this is done?
<input type="radio" id="foo">
<label for="foo"> Blah Blah </label>
Now you select the LABEL via CSS and set it to have a color... You can use classes or relationship, for example:
.radioDiv label { color:blue; }
Assuming the following HTML:
<input type="radio" name="group1" value="Milk" /><span>Milk</span>
Just either add a class to the span, or wrap it in a div and style that using basic CSS:
#somediv span
{
color: red;
}
精彩评论