How can we avoid shaking when we hover over an element and set its font in bold

How can we avoid shaking when we get the top of an element and set its font to be highlighted in bold? Here is an example of the code I wrote:

http://jsfiddle.net/8v4Ag/

Is there any way to avoid shaking? Suppose I hover over LogOff, the font is shown in bold, but this line of text shifts a little to the right due to the text becoming bold. If we hang it again, it shakes.

Is there any CSS way to avoid such shocks?

+3
source share
7 answers

, . : , : , . , .

+5

  • : ( ); : # 333, : # 000 - .
  • div (, ) , /. div , . .
+2

, "shake", , , , . , "" , , . @ring0 , . , (, ), .

+2

, , "" Help LogOff , , LogOff Help, , .

+1

BOLD , . , , , . , , text-shadow:. color: ...

+1

; . , - -, colorblind. , -.

, " ", , , , .

0

, :

a {padding: 10px; }

a: hover {padding: 8px; : ; }

depending on your original font size and line-height are set to the same px value

0
source

Source: https://habr.com/ru/post/1766994/


All Articles