Posted By

narmolanya on 05/11/07


css xhtml align

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Center text vertical

 / Published in: CSS

This code centers text vertical.

  1. <div id="foot">Vertical</div>
  3. #foot {
  4. height: 45px;
  5. line-height: 45px; }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: jonhenshaw on May 11, 2007

This is a great little piece of code. The trick of course is with "line-height". Thanks for posting that. I think a lot of people new to CSS will find that useful.

You need to login to post a comment.