Click to See Complete Forum and Search --> : Controling mouse pointer.


Mr_Floppy
08-18-2003, 03:53 PM
Is there a way I can change the pointer (preferably the the hand you see when you move over a link) when I move over an image?

Mr_Floppy

AdamGundry
08-18-2003, 03:59 PM
I think you want the CSS "cursor" selector: http://www.w3.org/TR/CSS2/ui.html#propdef-cursor

Adam

David Harrison
08-18-2003, 04:02 PM
Yeah you can change to any of the following:

crosshair
default     This changes it to the arrow.
help
move
pointer     This changes it to the hand.
text
wait

You can apply any of these by doing this:

style="cursor:something;"

Mr_Floppy
08-18-2003, 04:16 PM
I never really used events with JavaScript before. How can I do the CSS change when the mouse goes over a certain image?

Mr_Floppy

David Harrison
08-18-2003, 04:19 PM
Erm... <img src="123.png" style="cursor:something;">

Javascript just doesn't enter into it.

Mr_Floppy
08-18-2003, 04:27 PM
Thanks.

Mr_Floppy

David Harrison
08-18-2003, 04:29 PM
Happy to help. :)

pyro
08-18-2003, 04:49 PM
Originally posted by lavalamp
Yeah you can change to any of the following:Actually, as you can see in the link that Adam Gundry posted, you can change to even more than that, including a custom cursor (url).