Community News
Vertically Center Multi-Lined Text
cssglobe 14 May, 2009
Share on Facebook Tweet this Delicious StumbleUpon Reddit Subscribe
If you only have a single word or a single line of text, there is a clever way to vertically center it in a block with CSS. Set the line-height of that text to be equal to the height of the box. Works great, but is a major fail if that text needs to wrap.
Need more? Read these posts:
- Create a vertically centred horizontal navigation
- How to Center a Div (Horizontally and Vertically)
- Why is there no float: center?
- Easy Vertical Centering with CSS
- Vertically center content with CSS
Comments
No comments yet.
Sorry, further comments are disabled for this post.
CSS Globe is a web design magazine brought to you by Alen Grakalic and kept fresh with member contributed news and exlusive articles.