Vertical centering with line-height

/ Published in: CSS
Save to your folder(s)

When you have a container with fixed height you can use line-height property to vertically center the content.

Copy this code and paste it in your HTML
  1. line-height: 24px;


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.