tags:

views:

559

answers:

2

I really tried a lot to increase a size of checkbox in asp.net. using css style sheet but it doesn't work.

Might be I have done something wrong. I am try to increase the width, size and height of checkbox, but it doesnt happen yet.

Can anyone provide C# code or css code that can do this?

+2  A: 

You can't do it. A Checkbox is a windowed browser component. The best you can do is to make your own control that LOOKS like a checkbox, but is actually made up of an image for each state.

Here are some examples of controls that use images instead of checkboxes:

Gabriel McAdams
thanks. for your response. but i think it is possible.
Sikender
check out this link. and you got it..... http://www.456bereastreet.com/lab/styling-form-controls-revisited/checkbox/
Sikender
It works in IE 6 and IE 7, but not 8, and not FF, and not chrome (and even in IE, its very pixelated).
Gabriel McAdams
Most of the screenshots in that page show it not working.
Gabriel McAdams
@Sikender: Are you willing to use the AJAXControlToolkit (I recommend it)? If so, they have a toggle button control. You can simply specify the images, and it works: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/ToggleButton/ToggleButton.aspx
Gabriel McAdams
+2  A: 

Having a html checkbox.

<input type="checkbox" id="fatty">
<label for="checkbox-1">Checkbox 1</label>

fatty { /* Change width and height */
   width:4em;
   height:4em;
}

I got this from here.

Jason Rowe
no. i donot want to use html control. i am talking about .net checkbox control.
Sikender
thanks a lot. jason.
Sikender
@Sikender: The asp.net checkbox control renders similar to Jason's example.
Gabriel McAdams