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

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

From: Peter Foti (PeterF) <PeterF@SystolicNetworks.com>
Date: Wed, 24 Oct 2001 13:39:06 -0400
Message-ID: <A10A983C9DFBD4119F0300104B2EA6B7086000@ZIPPY>
To: "'Jesse McCarthy'" <mccarthy36@earthlink.net>
Cc: "'www-style@w3.org'" <www-style@w3.org>
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;

If whole1 has 100% width and 100% height, then you want to center
horizontally and vertically the item(s) in whole1.  You should be able
to do this with the styles above.  Of course, it doesn't work.  The
text-align seems to work, but the vertical-align is still top aligned.

This raises a new question.  Wouldn't "text-align" be more appropriately
called "horizontal-align"?  I mean, you might have non-text items within
the element that you are applying the alignment to.

And another question... why does text-align use "center" to mean the
center, and vertical-align uses "middle" to mean the center.  Could it
be that at some point there may be a single "align" attribute that will
take both text-align and vertical-align values?  For example, instead of
this:
text-align: left;
vertical-align: middle;

you could write this:
align: left middle;

Is that in the works?
Thanks,
Pete


> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org]On
> Behalf Of Jesse McCarthy
> Sent: Wednesday, October 24, 2001 1:18 PM
> To: Andrew McFarland; www-style@w3.org
> Subject: Re: How is it possible to devise such a feeble system?
> 
> 
> Sampo Syreeni <decoy@iki.fi> wrote on 10/24/01 1:17:25 PM:
> >I don't think this is quite true. Use absolute positioning 
> for the outer
> >div and set it to display:table-cell with 
> vertical-align:middle, or use
> >explicit height for everything.
> 
> I was referring to a legitimate way of doing it, without 
> involving tables at 
> all.  See this document: 
> http://www.jmmcc.com/testing/centering1.html . 
> 
> 
Received on Wednesday, 24 October 2001 13:40:19 GMT

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