Welcome to WebmasterWorld Guest from 54.159.26.69

Forum Moderators: open

Message Too Old, No Replies

Vertical align Text

     

Gemini23

7:58 pm on Feb 4, 2011 (gmt 0)

5+ Year Member



Can anyone advise what the css code for vertically aligning text is in Chrome? or that will work with IE, Firefox etc as these all do align text on my website vertically... but chrome doesn't

Thanks

Fotiman

8:02 pm on Feb 4, 2011 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



How are you aligning it?

Gemini23

8:20 pm on Feb 4, 2011 (gmt 0)

5+ Year Member



Currently using: vertical-align: middle;

which works for other browsers...

Fotiman

8:40 pm on Feb 4, 2011 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



vertical-align is not meant to apply for centering text. This is an often misunderstood style, and in all fairness it is a shortcoming of CSS2. There is an example here:
[w3.org...]

Which uses:

display: table-cell;
vertical-align: middle
 

Featured Threads

Hot Threads This Week

Hot Threads This Month