tags:

views:

80

answers:

3

Hi

i have the code below

<a id="treeSelector" style="cursor:pointer" >
    <img src="../../graphics/tree.gif" align="left" style="padding-right:5px;"/>
    <span>Root Page</span>
    <img src="../../graphics/arrow_down.gif" align="absmiddle"/>
</a>

My Problem is that using the span inside when mouseover the cursor form pointer becomes default arrow moving from arrow_down.gif to Root Pag text.

I know that if i use dislpay:block on will solve my problem BUT this not what i want because link has onmouseover show another div.

Can anyone help me

Thanks

A: 
<span style="cursor:pointer;">
Victor
+1  A: 

There are 2 really easy solutions.

  1. Use HREF

    <a href="#" onclick="return false;">...</a>
    
  2. Use CSS

    #treeSelector, #treeSelector *{ cursor:pointer }
    
Ghommey
I think the first point is key here. In IE, at least, anchors don't seem to act like anchors (pointer style, for example) unless it actually has a href. Adding a href will fix it for IE, and I suspect that other browsers work regardless.
SpoonMeiser
A: 

Thanks to all

The problem was a margin in span element

SOLVED!!!!!!!!!!!!!!!!!!!!

ntan