Aligning text with CSS

BigToque

Lifer
Oct 10, 1999
11,700
0
76
I have a line of text that I have centered horizontally on my page using text-align: center, but I want to know if I can align it in the center vertically as well.

I have an image that sits beside the text, and I want the text to be aligned in the vertical center of the image instead of sitting beside the bottom of the image.

Can this be done?
 

Abhoth

Senior member
Nov 13, 2002
345
0
76
I use the CSS below for images, wraps the text around images and such... might help in your attempts.

.imgfloatright { float : right; margin-left: 5px; }

.imgfloatleft { float : left; margin-right: 5px; }