Posted by: prajapatinilesh | January 28, 2008

Cursor pointer and hand problem in css

Unfortunately, IE5.x/Win doesn’t recognize the value pointer as meaning anything at all. IE6/Win and IE5.x/Mac do both recognize pointer as well as hand, fortunately. Meanwhile, Mozilla and Netscape 6+ follow the CSS2 specification and handle pointer, but ignore the proprietary value hand.

So if Mozilla/Netscape ignores hand and IE5.x/Win ignores pointer, what’s an author to do? Ask for both in the proper manner, and you shall be rewarded.

a {cursor: pointer; cursor: hand;}

Do not reverse those two values! If you write your styles as shown above, then NS6+ will see the first value and ignore the second, so you get pointer. In IE5.x/Win, it sees both and uses the second, so you get hand. If you reverse the values, then Netscape 6+ will be okay, but IE5.x/Win will see both and try to use the second. That won’t get you the little hand-pointer icon in IE5.x/Win.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: