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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vertical alignment

Status
Not open for further replies.

famtek

Instructor
Mar 27, 2007
67
US
Within a block <DIV> or a <P>, how can I position text either at (1) center or at (2) bottom of the block. thanks.
 
AFAIK, there is no surefire method to do that. You can work with padding or line-height if you know that you will be able to control the text (line-height will allow you centered text, but only if it does not spill over two lines). You would have to change block's display to table-cell and then vertical-align property in CSS will work as expected.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top