CSS: vertical-align property

You need to add the line-height attribute and that attribute must match the height of the div to center text in a div box.

This code is useful to centre text inside the box vertically and horizontally.

Centered text in a box!

Great Article about centering in css


Freelance frontend web developer and graphic designer with comprehensive experience in HTML, CSS, javascript, Adobe Photoshop and Adobe Illustrator.