Custom cursor on mouseover of mapped link

S

Simon Wigzell

I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear on
mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>
<img style="cursor: url('cursor1.cur')" src="...etc...">

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">

I'm think I will need to go to onmouseover/onmouseout functions to set the
style for an area tag? Thanks!
 
D

DU

Simon said:
I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear on
mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>

I would not style the body and font with custom cursor. You also need to
provide a default cursor value in case the referenced resource (custom
cursor) is not fetched, loaded and rendered. Right now, only MSIE 6
supports (static, not animated) custom cursors. The next release of
Mozilla should also support custom cursors (not all types though).
<img style="cursor: url('cursor1.cur')" src="...etc...">

You also need to indicate the usemap attribute.
This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">

You should always quote your attribute value of all your attributes.
"Why attribute values should always be quoted in HTML"
http://www.cs.tut.fi/~jkorpela/qattr.html

Does your document markup code and CSS code validate?
Can you provide the url?
I'm think I will need to go to onmouseover/onmouseout functions to set the
style for an area tag? Thanks!

In my opinion, you will confuse the user with so many custom cursors.
Custom cursors should be used sparingly and for very good reasons, like
identifying links which will open a new window (or recycle an already
opened window).

Your post has nothing really to do with javascript; you should have
posted your question in a css newsgroup/forum.

DU
 
S

Simon Wigzell

DU said:
I would not style the body and font with custom cursor. You also need to
provide a default cursor value in case the referenced resource (custom
cursor) is not fetched, loaded and rendered. Right now, only MSIE 6
supports (static, not animated) custom cursors. The next release of
Mozilla should also support custom cursors (not all types though).


You also need to indicate the usemap attribute.


You should always quote your attribute value of all your attributes.
"Why attribute values should always be quoted in HTML"
http://www.cs.tut.fi/~jkorpela/qattr.html

Does your document markup code and CSS code validate?
Can you provide the url?


In my opinion, you will confuse the user with so many custom cursors.
Custom cursors should be used sparingly and for very good reasons, like
identifying links which will open a new window (or recycle an already
opened window).

Your post has nothing really to do with javascript; you should have posted
your question in a css newsgroup/forum.

DU

Thanks, but the question was "how do a make a custom cursor work for an
area". The examples I gave were for doing it in CSS which does not work for
area so I was hoping there would be a javascript answer. It looks like all
you have done is glance at the CSS examples I gave and have completely
ignored the actual question!
 
D

Danny@Kendal

Simon Wigzell said:
I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear on
mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>
<img style="cursor: url('cursor1.cur')" src="...etc...">

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">

I'm think I will need to go to onmouseover/onmouseout functions to set the
style for an area tag? Thanks!

Try this instead
map{cursor:pointer}

Doesn't work for Firefox though.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top