jenniferG Posted November 1, 2006 Share Posted November 1, 2006 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> Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted November 1, 2006 Share Posted November 1, 2006 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. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 2, 2006 Share Posted November 2, 2006 Note that that this behavior is deprecated in the css spec.. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted November 3, 2006 Share Posted November 3, 2006 [quote author=ToonMariner link=topic=113415.msg461470#msg461470 date=1162428210]Note that that this behavior is deprecated in the css spec..[/quote]Where? I don't see it here: http://www.w3.org/TR/REC-CSS2/ui.html#cursor-props Quote Link to comment Share on other sites More sharing options...
tomfmason Posted November 3, 2006 Share Posted November 3, 2006 cursor:hand; Dosn't work in FF or Opera.. Use this instead[code]<div style="cursor:hand; cursor:pointer;">Something</div>[/code] Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 4, 2006 Share Posted November 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.