Alex Rivera | Logout

How to set CSS for disabled checkboxes?

Asked 2009-07-30T14:27:08.017
9

I'd like change the CSS for disabled checkboxes in a grid (they are too hard to see for the users). What is a simple way to do this?

My preference in technologies used (in descending order):
CSS
JavaScript
jQuery
Other

Edit
Report

1 Answer

4

Keep the checkbox enabled, but then add onfocus=this.blur() to the checkbox so it cannot be clicked.

Or if using ASP.net (as you say in your comment) keep the checkbox set to enabled and add the following to the Page.Load event:

CheckBox1.Attributes.Add("onclick", "return false;");
answered 2011-04-09T00:47:00.893

Your Answer