By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,611 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,611 IT Pros & Developers. It's quick & easy.

Custom cursor on mouseover of mapped link

P: n/a
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!


Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
DU
Simon Wigzell wrote:
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
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
Jul 23 '05 #2

P: n/a

"DU" <dr*******@hotNOSPAMmail.com> wrote in message
news:38*************@uni-berlin.de...
Simon Wigzell wrote:
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
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)


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!
Jul 23 '05 #3

P: n/a
"Simon Wigzell" <si**********@shaw.ca> wrote in message
news:COGVd.564122$8l.182914@pd7tw1no...
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.
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.