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.

elementName {
    height: 100px;
    line-height: 100px;
    vertical-align: middle;
    text-align: center;
  }

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

Centered text in a box!

Great Article about centering in css

huckbit

Programmer by day and mostly by night as well.