Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

CSS vertically aligning text in a DIV

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">
My text goes here.
</div>
[501 byte] By [Billkamm] at [2007-11-11 10:17:24]