I have a list of HTML checkboxes that I'd like to change into images that can be selected or deselected by the user.
In essence I'm trying to achieve something like this using pure CSS, if possible.
I have got it working in Chrome using:
.check_test {
width: 200px;
height: 200px;
background: blue;
-webkit-appearance: none;
}
.check_test:checked {
border: 2px solid blue;
}
<form>
<input class="check_test" type="checkbox" name="check1" style="background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Croquetplayers.jpg/220px-Croquetplayers.jpg); " />
</form>
However, according to caniuse this isn't going to work on IE.
Is there another CSS option that will achieve the same effect? If not, is there a simple jQuery solution?