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

CSS: How to vertically align text in a DIV 1

Status
Not open for further replies.

Billkamm

Programmer
Feb 9, 2006
74
US
I have a DIV tag and I want to vertically align the text within it. The DIV element's height is 200px, but no matter what I try the text is always at the top of this box. Is vertical-align: middle not the appropriate CSS for accomplishing this? I've even tried putting the text in a SPAN element and setting that to vertical-align: middle as well.

<div style="height: 200px; width: 685px; vertical-align: middle; text-align: center">
No providers have been associated with this loan. Click Add Provider button.
</div>
 
You might be better helped if you post this question in the HTML,XHTML & CSS forum here: forum215. For specifics on how and when it is appropriate to use vertical-align.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top