Vertical centering with line-height


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



Copy this code and paste it in your HTML
  1. div{
  2. height:100px;
  3. }
  4. div *{
  5. margin:0;
  6. }
  7. div p{
  8. line-height:100px;
  9. }
  10.  
  11. <p>Content here</p>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.