I am trying to change the font-size of some radio buttons :
<input type="radio" name="rdDate" id="ShowAll" value="Show All" style="border-style:none;margin-left:0px;font-size:11px;"/>Show All
<input type="radio" name="rdDate" id="ShowCurrent" value="Show Current" style="border-style:none;font-size:11px;"/>Show Current
But adding style="font-size:11px;" to the input tag does not change the text size. The only way I have found to do this is to wrap the text in a font tag, but then you are limited to a font size of 1 to 7, none of which is the right size for what I require.
Does anybody know how to change the font size of a radio button text?
To change the font size of a button, use the font-size property.
The <input type="radio"> defines a radio button. Radio buttons are normally presented in radio groups (a collection of radio buttons describing a set of related options). Only one radio button in a group can be selected at the same time.
The text is beside the radio button, not inside it.
First, add a <label>
element (make sure the for
attribute matches the id
of the input with which it is associated, this will link them so people will have a bigger click target and screen reader users will know which label belongs with which control).
Then style the label.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With