This is used when the element's dimensions (
height) are not known or dynamic.
Prefer to use Flexbox over all other options as it is optimized for user interface design.
Centering Text with Line Height
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0