Hovering an element with border attribute gets moved

CileKitly

New Member
When hovering an li-element, I want to add a border at the bottom and the top. The code looks like that:\[code\]#overview li:hover { background: rgb(31, 31, 31); border-top: 1px solid white; border-bottom: 1px solid white;}\[/code\]http://jsfiddle.net/rwDYR/ (hover the navigation on the left)The problem is, that it moves the li element for 1 or 2 pixels. I already tried to add a \[code\]margin-top: -1px\[/code\] for the hover state, but that's not solving the problem.Any idea?
 
Back
Top