开发者

html link breaks

开发者 https://www.devze.com 2022-12-11 04:49 出处:网络
i have the code below <a id=\"treeSelector\" style=\"cursor:pointer\" > 开发者_Python百科 <img src=\"../../graphics/tree.gif\" align=\"left\" style=\"padding-right:5px;\"/>

i have the code below

<a id="treeSelector" style="cursor:pointer" >
   开发者_Python百科 <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


There are 2 really easy solutions.

  1. Use HREF

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

    #treeSelector, #treeSelector *{ cursor:pointer }
    


<span style="cursor:pointer;">
0

精彩评论

暂无评论...
验证码 换一张
取 消