...

View Full Version : Centering text in a block



RisTar
05-16-2008, 01:21 PM
Hi guys , does any1 know how can i center text-height inside of a block or a div tag ?

i can use text-align: center; but its center only in width ...

abduraooft
05-16-2008, 01:33 PM
Apply a line-height property having a value equal to the height of that element.

effpeetee
05-16-2008, 02:13 PM
This may be useful too.

http://community.contractwebdevelopment.com/css-vertically-and-horizontally-center

Frank

Kor
05-16-2008, 02:18 PM
This may be useful too.

http://community.contractwebdevelopment.com/css-vertically-and-horizontally-center

Frank
Yes, but that is useful for block elements contained by block elements. Yet a text is inline displayed:)

effpeetee
05-16-2008, 02:23 PM
Thanks,

I'm not at my best this morning. My head is definitely a BLOCK element.

However, this may be of interest.

http://phrogz.net/CSS/vertical-align/index.html

Frank



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum