In FF3 I see a hand when the mouse is over the element, but in IE6 I don't. Why ? Is there any workaround ?
IE6 doesn't support ":hover" selectors on anything else than <a>
elements
As Philippe mentioned, IE6 only supports :hover
on <a>
elements. You asked for a workaround, the only workarounds require javascript to be enabled:
Sometimes cursor: hand
will work. Best to specify both, for standards-compliant browsers using:
cursor: pointer, hand;
What you can also do is copy the cursor from a Windows installation and point to it using a URL:
cursor: url(pointer.cur);
Or, even better yet, have it as a backup and insert it using IE's wacky support for conditional comments:
<!-- normal CSS -->
<style type="text/css">
.clickable {
cursor: pointer;
}
</style>
<!--[if IE 6]>
<style type="text/css">
.clickable {
cursor: url(pointer.cur);
}
</style>
<![endif]-->
You can simply set foo { cursor: pointer; }
(without :hover
), or (better) use an a
element as you almost certainly should anyways.
I would simply use Javascript if it's anything other than an tag. If you're using jQuery, you could do something like this:
$('#element').hover( function() {
$(this).css('cursor', 'pointer');
}, function() {
$(this).css('cursor', 'inherit');
});