I try to style checkbox background color, but it won't change whatever I do. I am using firefox 29 latest.
Is there some rule changes in css or may be in the browser?
CSS:
input[type="checkbox"] {
background: #990000;
}
.chk {
background-color: #990000;
}
Here is a demo http://jsfiddle.net/6KXRg/
I had the same issue, trying to use large inputs and had a very small checkbox. After some searching, this is good enough for my needs:
JSFiddle
Maybe someone will find it useful.
Let's say you have a checkbox with the class (bootstrap) .form-check-input. Then you can use an image for an example as the check mark.
SCSS code:
Checkboxes are not able to be styled. You would need a third party js plugin there are many available.
If you want to do this yourself it basically involves hiding the checkbox creating an element and styling that as you want then binding its click event to two functions one to change its look and another to activate the click event of the checkbox.
The same problem will arise when trying to style that little down arrow on a drop-down select element.
Agree with iLoveTux , applying too many things (many colors and backgrounds) nothing worked , but here's what started working, Apply these properties to its css:
and then css styling started working on checkbox :)
Technically, it is possible to change the color of anything with CSS. As mentioned, you can't change the background-color or color but you can use CSS filters. For example:
If you are really looking for design control over checkboxes though, your best bet is to do the "hidden" checkbox and style an adjacent element such as a div.
you cant change the background of checkbox but some how you can do a trick try this :)