M
M
mishapsv2018-03-29 18:16:14
css
mishapsv, 2018-03-29 18:16:14

How to vertically center text at its line-height?

I know how to basically align text.
But here's something dumb.
Here's an example https://codepen.io/anon/pen/yKvZML
(there "y" almost pops out, and there is still a lot of space from "T")
By default, the text is pressed to the bottom within its line-height.
And this is somehow very noticeable in my block.
Can this be neatly compensated for without padding and positions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2018-03-29
@HeadOnFire

Just two links "to read":
https://stackoverflow.com/a/28370374/1185107
https://www.w3.org/TR/CSS21/visudet.html#line-height
Compensate with padding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question