View Full Version : a:link when hovering moves 1px aside

Nov 22nd, 2008, 10:15 AM
I have a weired problem
In IE6 and IE7, a:link when hovered will make the particular line to move 1px left.

This is fine in FF2 and 3.

a { color: #006699;text-decoration: none; }
a:link { color: #0267FE;text-decoration: none; }
a:visited { color: #0267FE;text-decoration: none; }
a:hover { color: #0267FE;text-decoration: underline;background: #EDEDED; }
a:active { color:#000; }
a:hover { color: #0267FE;text-decoration: underline;background: #EDEDED; }

If I remove
background: #EDEDED;
then it works fine. Could not guess whats the problem..I want the bgcolor to appear when hover and the link should not move..:confused:

Anybody to help please!!

Nov 22nd, 2008, 02:28 PM
Can we have your rest of html+markup to replicate the issue at our end? Or a link would be better.

Nov 22nd, 2008, 02:43 PM
I can't test the code with just that. I need a link to your page to see the problem. You can try setting margin:0px.

Major Payne
Nov 24th, 2008, 12:25 AM
Just in case it's not a problem with your page not having a proper DocType causing the browser you are using to display this behavior, I would at least try adding the Universal Selector code below to the VERY TOP of your CSS:

* { margin: 0; padding: 0; border: 0; }

May or may not help, but worth a try until you post more info as requested.