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 a fiddle to try out
Here's an example of how checkboxes are rendering in all browsers:
I'm using chrome 32.0.1700.76 m
- Is this an issue other people are having with chrome?
- If other people aren't having this issue, any ideas what could be causing it (extension, add on)
- Is this actually the way chrome chooses to render checkboxes?
- If so, are there any workarounds for cross browser consistency?
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 theinset
option so the shadow goes inwardsAdd this CSS:
Here's a Demo in Fiddle
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*