Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a checkbox bigger?

Tags:

html

jquery

css

My web page uses checkboxes. They appear very small. I tried to make them bigger by using "font-size: 1.5em". This didn't seem to change them at all.

Is there a simple way that I can make a checkbox bigger?

Thanks,

like image 709
Jason Avatar asked Aug 27 '11 09:08

Jason


People also ask

How do I increase the size of a checkbox?

Method 1: The checkbox size can be set by using height and width property. The height property sets the height of checkbox and width property sets the width of the checkbox.

Can you make checkboxes bigger in Excel?

Right-click the checkbox, and select Format Control from the right-clicking menu as below screenshot show. 2. In the popping up Format Control dialog box, select the Move and size with cells option under the Properties tab, and then click the OK button.


1 Answers

You can do this using images.

CSS

#mycheckbox
{ 
    display: none; 
}

#mycheckbox + label
{ 
    float: left; 
    width: 200px; 
    height: 200px; 
    background: url('/path/to/photo_of_big_unchecked_box.png'); 
}

#mycheckbox:checked + label
{ 
    background: url('/path/to/photo_of_big_checked_box.png'); 
}

HTML

<input type="checkbox" name="mycheckbox" id="mycheckbox"><label for="mycheckbox"></label>

That's one way you might accomplish the goal.

EDIT

Here is the working link for IE

like image 73
Null Pointer Avatar answered Sep 21 '22 07:09

Null Pointer