Unordered list navigation - hovered element moves 1px left

Posted by rodrigo on Stack Overflow See other posts from Stack Overflow or by rodrigo
Published on 2011-03-17T07:51:22Z Indexed on 2011/03/17 8:10 UTC
Read the original article Hit count: 178

Filed under:
|

I have unordered list navigation like this. When anchor is hovered navigation list moves 1px left. How to fix that ?

Here is my code

<ul id="nav">
  <li><a href="#">First</a></li>
  <li><a href="#">Second</a></li>
  <li><a href="#">Third</a></li>
</li>

Here is my css:

ul#nav li {
    float: left;
    margin: 0; padding: 0;
}

ul#nav li a:hover {
    -moz-border-radius:3px;
    border: 1px solid #ccc;
}

© Stack Overflow or respective owner

Related posts about html

Related posts about css