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;

URL: http://cssglobe.com/articles/one_liners/line_height.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.