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

Ooops... my bad.  You are correct, vertical-align only applies to inline
items (which seems foolish to me).  Reading the spec, it almost seems
like they expected all vertical alignment to be done by setting the
margins.  However, in a case where you want to center a box, you
probably don't know what the margins should be.


> -----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:42 PM
> To: www-style@w3.org
> Subject: Re:RE: How is it possible to devise such a feeble system?
> "Peter Foti (PeterF)" <PeterF@SystolicNetworks.com> wrote on 
> 10/24/01 1:39:06 
> PM: 
> >
> >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.
> According to the spec, vertical-align would have no bearing 
> on this situation.  
> It applies only to "inline-level and 'table-cell' elements".  
> That's my main 
> problem here, that there is no "vertical-align" property that 
> applies to this 
> situation.  You are right, of course, that text-align allows 
> for horizontal 
> centering. 
> >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
> You raise some good points.  I've always thought it would 
> make more sense to 
> call that property something other than text-align, and why 
> not 'horizontal-
> align', makes sense to me, but it's not practically 
> significant.  As far as the 
> difference in possible values between the two properties you 
> mentioned, there 
> is more to vertical-align than there is to text-align.  
> There's probably a 
> precedent for these values, e.g. in typography, that we're 
> not aware of. 

Received on Wednesday, 24 October 2001 14:19:35 UTC