Align text vertically center in div with CSS

imageApril 20, 2016
Follow me on:

In this example I will show you on how you can align text vertically in the middle with div tag. There are few ways to align a text vertically in the center using CSS code.

Ways to align text vertically center

Below are the properties that can use to vertical align a text in the middle of a div tag.

  • line-height
  • transform
  • display

See the Pen Align text vertically center by Andreas Eracleous (@Sp00ky) on CodePen.