Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create CSS to enlarge checkboxes

I am trying to double the size of my checkboxes on a few pages. How do I make that happen in CSS? I don't want to style the hover.

Ideas?

like image 731
codeChris Avatar asked Nov 29 '12 17:11

codeChris


People also ask

How do you make check boxes bigger?

Right-click the selection, and then click Format Control. On the Size tab, enter measurements for the height and width of the control, or click the up or down arrow keys to move the height and width.


3 Answers

To double the size of checkboxes, you can use the CSS scale property. The (2,2) means 2 times the width and 2 times the height of the original, but this will be quite large.

input[type="checkbox"] {
  transform:scale(2, 2);
}

You can also use decimal values, for just slightly bigger checkboxes.

input[type="checkbox"] {
      transform:scale(1.3, 1.3);
    }
like image 92
stwp Avatar answered Oct 11 '22 21:10

stwp


This works. It uses relative sizes so it scales with your current font size.

input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
}

You may need to adjust your margins though.

like image 29
Chloe Avatar answered Oct 11 '22 23:10

Chloe


Styling checkboxes is risky business. It's one of those things that never seems to work consistently with all browsers.

or you can try with

 style="zoom:1.2"

jQuery offers a plugin to do a replacement on checkboxes

like image 11
Rahul Tripathi Avatar answered Oct 11 '22 21:10

Rahul Tripathi