Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase size of checkbox in asp.net?

Tags:

c#

css

asp.net

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?

like image 541
sikender Avatar asked Jan 09 '10 00:01

sikender


2 Answers

In asp.net a checkbox will become a span with an input of type "checkbox"

In order to resize it, just apply a css class to the asp.net checkbox and add this to your style sheet. the style must be applied to the the embeded input of the checkbox like this :

<asp:CheckBox ID="chkBoxName" runat="server" CssClass="ChkBoxClass"/>

.ChkBoxClass input {width:25px; height:25px;}
like image 170
Yannick Richard Avatar answered Sep 28 '22 07:09

Yannick Richard


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.

like image 26
Jason Rowe Avatar answered Sep 28 '22 07:09

Jason Rowe