I am trying to create a custom checkbox using CSS only and havent had much luck. Ive tried 2 different techniques:
- http://lea.verou.me/2011/05/rule-filtering-based-on-specific-selectors-support/
- Custom images as radio buttons (the suggestion by derik)
The first one works the best, and displays correctly in IE9, FF, and Chrome. However, the functionality in chrome seems to be a little off. In testing on Chrome, I am unable to click the image to cause a change in “checked”, instead I have to click the label’s text. Has anyone found a better, CSS only, way? Is there a way to correct the behavior in Chrome?
Mike a great solution for this is not to style the checkbox but style a label of the checkbox and hide the checkbox button.
When you click the label it will check the checkbox, hide this and use css/javascript to do whatever you want with the label. This is easier than trying to style the checkbox because all browsers render inputs differently.