Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resizing radio button [duplicate]

I want to change size of a radio button control using only HTML and/or CSS.

Is it possible to do without using images?

like image 229
cherry Avatar asked May 17 '12 05:05

cherry


People also ask

How do I change the size of a radio button?

Setting the border to 0 seems to allow the user to change the size of the button and have the browser render it in that size for eg. the above height: 2em will render the button at twice the line height. This also works for checkboxes ( input[type=checkbox] ). Some browsers render better than others.

Can you make radio buttons bigger?

Bigger Radio Buttons can be achieved by injecting the neccesary CSS code to your form. Example Form: http://form.jotformpro.com/form/40718865480967? All you need to do is customize the value 50px to a higer or lower value you wish to use.

How do you change the radio button size in flutter?

Well you can wrap it in Transform. Scale then use the scale property to increase it.


2 Answers

One quick solution to resizing the radio button is to transform it:

input[type='radio'] {
    transform: scale(2);
}

This results in all radio buttons being twice as large. As always, check browser support.

Original Answer (May 27, 2012)

You cannot change the size of the radio button. Typically people will design a custom UI element to replace the UI aspect of the checkbox/radiobutton. Clicking it results in a click on the underlying checkbox/radio button.

See an example here: http://webdesign.maratz.com...radio-buttons/jquery.html

like image 189
Sampson Avatar answered Sep 17 '22 08:09

Sampson


Not really, not in a cross-browser manner. In Firefox, Safari, and Chrome, you can remove the default radio-button styling by setting appearance:none; (with vendor prefixes), then you can style it as you like. But IE and Opera don't support this yet.

The only reliable way to achieve styled checkboxes is to use javascript to make a different element act like a checkbox. But, of course, then you're screwing people with javascript disabled. In the end, the problem is sticky enough that I tend to leave checkboxes unstyled except for positioning.

like image 26
st-boost Avatar answered Sep 21 '22 08:09

st-boost