tags:

views:

94

answers:

2

How can we avoid the shake when we hover over an element and set its border? Here is a sample of the code I wrote:

http://jsfiddle.net/s3N2h/

Is there a technique to avoid the shaking? Suppose I hover on File, the borders appears, but that line of text moves a little to the right due to the borders getting rendered. If we hover away it again shakes.

Is there any CSS way of avoiding such shakes?

+15  A: 
Andy E
The amount of times I've had silly issues like this and this *never* occurred to me *facepalm* +1
Neil Trodden
+2  A: 

Alternatively, when setting the border add a negative margin of the same size.

Radomir Dopieralski