Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing the font size of radio button text

Tags:

html

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?

like image 929
user517406 Avatar asked May 26 '11 10:05

user517406


People also ask

How do I change the size of the button font?

To change the font size of a button, use the font-size property.

How do you text a radio button?

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.


1 Answers

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.

like image 152
Quentin Avatar answered Sep 19 '22 17:09

Quentin