Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.