I am trying to perform vertical alignment with pixel perfection, two text.
One is completely capital, the other is not.
http://codepen.io/FezVrasta/pen/EjxJoz
div { outline: 1px solid red; height: 31px; width: 400px; float: left; line-height: 31px; } span { display: inline-block; vertical-align: middle; }
As you can see, the heading is fully centered (20px above and 20px below).
Another one has 26px higher and 19px lower.
I think it always centers the text, suggesting the higher possible character as the center ... but I would like to focus the current text, considering only the characters used.
Is there any way?
NB: Using CSS tables will not fix the problem.
source share