Use a paddingand a border-toptransparent that changes color during the :hover. This way when you hover you won't see a jump down when drawing the border.
As seen in your image, you will need to enclose each item in a divparent which is used for this.
If you're looking to make a menu with
HTML5
, you could do it like this:Use a
padding
and aborder-top
transparent that changes color during the:hover
. This way when you hover you won't see a jump down when drawing the border.As seen in your image, you will need to enclose each item in a
div
parent which is used for this.Try using a wrapper for your element and on top of this wrapper define a new style that completes your design requirements.