CSS trouble. Hand or Pointer?

D

Daz

Hi everyone.

I am looking for a method where I can dynamically choose whether to use
the hand cursor or pointer cursor, without actually identifying the
browser first. IE supports the 'hand' cursor and not the 'pointer'
cursor, and Firefox supports pointer instead, but not the hand pointer.
What I am looking to do, is instead of identifying the browser, I would
like the check if the particular cursor style is supported by the
browser (which could be a browser I don't know about, so haven't tested
it on).

This will also ensure that my script remains compatible with most
changes that might be made to these browsers in the future, for
example, if IE starts supporting the 'pointer' cursor. Then I wouldn't
need to change my script. To me this is what dynamic scripting is all
about, as opposed to identifying a browser, and possibly getting it
wrong, or having to do more work.

Many thanks in advace.

Daz.
 
D

Daz

Daz said:
Hi everyone.

I am looking for a method where I can dynamically choose whether to use
the hand cursor or pointer cursor, without actually identifying the
browser first. IE supports the 'hand' cursor and not the 'pointer'
cursor, and Firefox supports pointer instead, but not the hand pointer.
What I am looking to do, is instead of identifying the browser, I would
like the check if the particular cursor style is supported by the
browser (which could be a browser I don't know about, so haven't tested
it on).

This will also ensure that my script remains compatible with most
changes that might be made to these browsers in the future, for
example, if IE starts supporting the 'pointer' cursor. Then I wouldn't
need to change my script. To me this is what dynamic scripting is all
about, as opposed to identifying a browser, and possibly getting it
wrong, or having to do more work.

Many thanks in advace.

Daz.

Problem solved!

Simply use:
cursor: pointer;
cursor: hand;
in your CSS.

Note, that:
cursor: hand;
cursor: pointer;
doesn't appear to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top