Answer the question
In order to leave comments, you need to log in
Why is the caption not centered vertically (visually raised 2 pixels up)?
https://codepen.io/Larka_Ska/pen/oPEjoW
Actually, I don't have a solid knowledge of css, because of this I can't understand why the inscription on the purple button is creeping up.
I think there is something wrong with the line-height... or maybe not.
It is important that the button is 40px high and the caption is 15px high, i.e. the height of the letters and padding should end up being 40px. It is impossible to set the height of the div in which the button is placed in these 40 px.
ps do not pay attention to the fact that the sandwich icon is blurry. It will be 40 by 40 px in svg in the end.
Answer the question
In order to leave comments, you need to log in
Line - height can be removed, and for added.menu-button a
.menu-button
display: flex;
align-items: center;
a {
position: relative;
top:1px
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question