When I hover over a checkbox or it's label in Firefox or IE, the checkbox enters an active state where it is highlighted, indicating that a click will affect it. However this doesn't appear to be working chrome for me.
Here's some very, very simple code:
<label>
<input type="checkbox"/>
Sample Check Label
</label>
Here's an example of how checkboxes are rendering in all browsers:
I'm using chrome 32.0.1700.76 m
Since apparently chrome is doing this intentionally to move away from native controls, here's a way to change the default behavior in chrome.
input
with [type=checkbox]
:hover
pseudo-class to conditionally apply values when hovering-webkit-
browsers†Box-Shadow
, using the inset
option so the shadow goes inwardsAdd this CSS:
input[type=checkbox]:hover {
-webkit-box-shadow: inset 0 0 2px 2px rgba(82,168,236,.6);
}
Here's an example*:
†The webkit prefix will also apply to safari browsers
**There have been prettier things in the world, but I'd still rather have this than nothing*