A common way to replace a standard input is display:none the input, and then add a background-image to the label.
CSS:
input[type="checkbox"] {
display: none;
}
input[type="checkbox"]+label {
background: url('../images/checkbox_unchecked.png') left center no-repeat;
background-size: 25px;
}
input[type="checkbox"]:checked+label {
background: url('../images/checkbox_checked.png') left center no-repeat;
background-size: 25px;
}
The problem: The HTML is broken afterwards. When i want to change the direction of the elements, I have to change it inside the CSS (background: right).
How can I change the image/style of an input field without make it display:none first, and then change the background image? It has to work in Android 2.3.
EDIT: JSFiddle.