This question has already been answered:

How to checkbox to apply red border and make a tick in red?

Reported as a duplicate at Qwertiy css Oct 24 '18 at 2:26 pm

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Checkbox itself - no way. But the checkbox itself can be shrunk to a width of zero pixels, say, and its rendering is implemented with the help of: before. - etki

1 answer 1

I'll give you a "cool" tip, and then yourself, OK? ( http://jsfiddle.net/4qqjhtw7/ )

input { display: none; } input + i { /* some style */ } input:checked + i { /* some style */ } <label> <input type="checkbox" /> <i></i> Checkbox Label </label> 

The only drawback is that for IE8 you need to script and hang the class "manually", from IE9 + it works great! For completeness, the script for backward browsers is: http://jsfiddle.net/vtdb8rh3/1/

  • in ie8 it works, just instead of display: none you should do postion: fixed; left -1000px; like mine in the next example. - zb '
  • one
    Unfortunately not ( caniuse.com/#search=%3Achecked ) IE8 does not understand :checked - ferrari
  • I'll check it out on Monday, like I just recently used it and tested it in IE8 and the only thing he didn’t like was display: none for input to the label. - zb '
  • but surely I didn’t need the style, but just to click on the label worked. - zb '