Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<A> attribute gives Edit cursor on hover

Tags:

html

css

I am defining three menu buttons

<div id="buttonscontainer">
    <ul>
    <li><a unselectable="on" value="insert" onClick="insertText('[BEFORE]', '[AFTER]'); return false;">Bold</a></li>
    <li><a unselectable="on" value="insert" onClick="insertText('[BEFORE]', '[AFTER]'); return false;">Italic</a></li>
    <li><a unselectable="on" value="insert" onClick="insertText('[BEFORE]', '[AFTER]'); return false;">Image</a></li>
    </ul>
    </div>

I use <a> tag to create simple text button with OnClick jscript.

The problem is that when user hovers over the link the cursors is changed to edit (like editbox cursor)

Why is that behaviuor? Or do I have to look in CSS for particular attribute

like image 666
Captain Comic Avatar asked Apr 27 '26 17:04

Captain Comic


1 Answers

You either need to add the href attribute to your anchor or in CSS you can add:

#buttonscontainer a:hover
{
    cursor: pointer;
}

Either of those will change the cursor to the pointer :)

jsFiddle example.

like image 50
Kyle Avatar answered Apr 29 '26 06:04

Kyle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!