Jump to content

cursor control


jenniferG

Recommended Posts

we are trying to manage the cursor inside a <DIV> tag with the following test page.  The cursor does indeed change to a hand when  over the div tag, and it changes back  if I move the cursor  up or down to a different vertical position. But, if I  move the cursor over the <DIV>gghf</DIV>  tag and then  move the cursor  horizontally  past the tag, the mousover event is not fired and the cursor does not change back to default. Only when I move cursor vertically does it change back properly
******************************************************************************
<html>

<head>
  <title></title>
</head>

<body>
<DIV onmouseover="this.style.cursor='hand';"onMouseOut="this.style.cursor='default';">cursor test</DIV>


</body>

</html>


Link to comment
https://forums.phpfreaks.com/topic/25761-cursor-control/
Share on other sites

That is because the div has a width of 100%, meaning that even though there is no text it is still inside the div. A better way do this would be to use [code]<div style='cursor:hand;'>cursor test</div>[/code], by the way.

If you only want it on the text you could use the span tag instead.
Link to comment
https://forums.phpfreaks.com/topic/25761-cursor-control/#findComment-118002
Share on other sites

hmmmm... I was sure I had read somewhere but can't find it now.  Still I think it best to leave the 'behaviour' of the mouse on screen well alone - incase users expect something from it and its just to point over an element but won't do anything.
Link to comment
https://forums.phpfreaks.com/topic/25761-cursor-control/#findComment-119400
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.