Re: box-align

On May 12, 2011, at 10:26 AM, Alex Mogilevsky wrote:

> I am not sure we've closed on this, have we?
> 
> The matter of expressing <center> in CSS I find quite interesting -- all browsers do implement it, so if defined properly there should be no new layout work just parse and apply...
> 
> FWIF, I believe we implement <center>, <left> and <right> by having an extra set of margins in widths & martins formulas, the extra margins can only be set to zero or auto and are considered last.
> 
> This thread however was not sponsored by the element <center>. I don't believe it is missed all that much. What people *really* want is vertical centering of direct children of a box with specified height (such as label in a button or video in viewport). That will work fine without inheritance.
> 
> Now, if somebody wants "true center" this is the thread to speak up)))

I do, I do!

I would like to set one property on one container, and have all the block-level children (descendants?) align within it either vertically, horizontally, or both. It would be very useful. Using auto margins on each child is a PIA, and vertical centering is hard.

Received on Thursday, 12 May 2011 17:43:04 UTC