How to set CSS for disabled checkboxes?

checkbox, css, html

Solution

I'd suggest changing the colour of the background (the `background-color` of the form/fieldset), and see if you can come up with a better contrast. If you just want to change the colour of disabled (non-selectable?) checkboxes you can try:

input[disabled] {
...
/* CSS here */
...
}

But if they're disabled for a reason, surely they don't need to be prominently visible? The aim for their being greyed-out is, surely, to avoid confusion between active/enabled and inactive/disabled form elements?

Problem

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

Original source