Take the 2-minute tour ×

I want to change the standard "3D" look of the standard asp.net checkbox to say solid 1px. If I try to apply the styling to the Border for example it does just that - draws the standard checkbox with a border around it - which is valid I guess.

Anyway, is there a way to change how the actual textbox is styled?

share|improve this question
add comment

7 Answers

up vote 4 down vote accepted

I think the best way to make CheckBox looks really different is not to use checkbox control at all. Better use your own images for checked/unchecked state on-top of hyperlink or image element. Cheers.

share|improve this answer
Pretty much the conclusion I came up with also! –  JamesSugrue Sep 22 '08 at 2:46
Usability and progressive enhancement, that's sooo last year... :( –  ANeves Apr 12 '10 at 14:19
add comment

Rather than use some non-standard control, what you should be doing is using un-obtrusive javascript to do it after the fact. See http://code.google.com/p/jquery-checkbox/ for an example.

Using the standard ASP checkbox simplifies writing the code. You don't have to write your own user control, and all your existing code/pages don't have to be updated.

More importantly, it is a standard HTML control that all browsers can recognize. It is accessible to all users, and work if they don't have javascript. For example, screen readers for the blind will be able to understand it as a checkbox control, and not just an image with a link.

share|improve this answer
add comment

Simplest best way, using the ASP checkbox control

chkOrder.InputAttributes["class"] = "fancyCssClass";

you can use something like that.. hope that helps

share|improve this answer
add comment

Keep in mind that the asp:CheckBox control actually outputs more than just a single checkbox input.

For example, my code outputs

<span class="CheckBoxStyle">
    <input id="ctl00_cphContent_cbCheckBox" 

where CheckBoxStyle is the value of the CssClass attribute applied to the control and cbCheckBox is the ID of the control.

To style the input, you need to write CSS to target

span.CheckBox input {
  /* Styles here */
share|improve this answer
add comment

Not sure that it's really an asp.net related question.. Give this a shot, lots of good info here:


share|improve this answer
add comment

They're dependent on the browser really.

Maybe you could do something similar to the answer in this question about changing the file browse button.

share|improve this answer
add comment

Why not use Asp.net CheckBox button with ToggleButtonExtender available from the Ajax control toolkit.

share|improve this answer
add comment

Your Answer


