Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I have the following :
HTML
<div class="pager">
    <a onclick="dosomething();" >here</a>
</div>

with a style of:
CSS
.pager a {
    text-decoration: underline;
    cursor: pointer;
}

This works fine on every browser except IE in that when I mouse over and try to click, the tag moves down a line so in effect I cannot click on it.

[Update]
If I add
HTML
<!DOCTYPE html>
to the top of the page then the other browsers do the same as IE and mess things up and move elements on mouse down.

I have uploaded a sample to : http://jsfiddle.net/s3hbu2bv/[^]

- If you try to click on the "view name" dropdown you will see that it moves
Posted
Updated 13-Apr-15 21:02pm
v4
Comments
Nathan Minier 13-Apr-15 8:07am    
Have you tried adding href="#" or even just a naked href attribute to the anchor?
Mehdi Gholam 13-Apr-15 9:18am    
Interesting, if I add it then chrome does the same.
Nathan Minier 13-Apr-15 9:20am    
That is odd. Are you running any libraries?
Mehdi Gholam 13-Apr-15 9:21am    
No, my own js and css.
Mehdi Gholam 13-Apr-15 9:28am    
With href="" chrome added the following css in the elements (user agent style sheet)

a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900