views:

26

answers:

2

I think this is a pretty simple thing to do, but I don't know how.. 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?

A: 

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;
}
RPM1984
+2  A: 
<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; }
Šime Vidas