Styling disabled checkbox inputs

One more of these and then I'll stop trying to turn this Questions section into my own personal CSS school... for at least a few weeks.

Is it possible to style checkboxes? Specifically I have a page using some checked and unchecked items; they're not intended to be editable by visitors, that's fine, but I think the 'disabled' selector is messing me up.

Here's the page (I'm trying to just make the 'checked' boxes stand out a bit more by giving them a coloured background. Here's what I've tried to no avail:

input[type="checkbox"]:disabled {
  background: #46adf9;
2 replies

It is possible to but I think it involves a bit of a hack. The technique to style checkboxes, even disabled ones, is described nicely by John Reid over on Stack Overflow. It's a bit of a hack but should get you what you're after.

Please let me know if you have any questions about this or anything else

Answered a year ago · Improve this answer

Wow, who knew this particular customisation would be so specifically problematic? Thanks very much for providing a solution.

Answered a year ago · Improve this answer

Markdown allowed
Question or feedback?
Contact us


developers 28 questions bug 14 questions posts 9 questions resolved 7 questions request 6 questions google-drive 5 questions configure 4 questions pages 3 questions added 3 questions meta 3 questions More tags →
Subscribe for changes
RSS Feed of latest questions