Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to vertically align text in a DIV using CSS?

Status
Not open for further replies.

EugenePaliev

Programmer
Jul 18, 2001
537
UA
Hi people!

The question is How to vertically align text in a DIV using CSS? I have DIV element and some text inside it. Text is top aligned; I want it to be middle aligned. Using style { vertically-align: middle; } applied to div or text doesn't work. The only thing I could make is to vertically align image inside text (both are inline elements), but I need to align text inside DIV element (inline element inside block element). I can remember I could achieve this before but have no luck at present...

Your help is very appreciated!!!

Good Luck! :)
 
Try "vertical-align: middle".

Kevin
A+, Network+, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top