W3C home > Mailing lists > Public > www-style@w3.org > October 2001

Re: How is it possible to devise such a feeble system?

From: Andy <lordpixel@mac.com>
Date: Wed, 24 Oct 2001 18:02:24 -0400
Message-ID: <3BD73A70.ED4767C3@mac.com>
To: www-style <www-style@w3.org>
Sampo Syreeni wrote:
> 
> On Wed, 24 Oct 2001, Peter Foti (PeterF) wrote:
> 
> >Looking at your example, I would think that the correct way to do it
> >would be to add this to your whole1 style:
> >
> >text-align: center;
> >vertical-align: middle;
> 
> Of course. I wasn't talking about horizontal alignment, at all. Besides,
> the approach is borrowed from who-knows-where, in its entirety.
> 
> >Of course, it doesn't work. The text-align seems to work, but the
> >vertical-align is still top aligned.
> 
> Yep. Most browsers get it wrong. Maybe even all of them. Don't you just
> hate incomplete implementations.

I wouldn't claim Mozilla implementation is perfect (because I don't
know), but its pretty good:

Try this out:

<p>try this <span style="vertical-align:middle; font-size:xx-large;">out
for size</span> why don't you</p>
<p>try this <span style="vertical-align:bottom; font-size:xx-large;">out
for size</span> why don't you</p>
<p>try this <span style="vertical-align:top; font-size:xx-large;">out
for size</span> why don't you</p>



The point about vertical-align that I've often missed is it *only*
applies to inline elements not blocks, and it only really has any
visible effect when you mix things of different heights.

-- 
AndyT (lordpixel)
Received on Wednesday, 24 October 2001 18:02:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:11 GMT