Re: Alignment property proposal

On Dec 26, 2007, at 12:44 AM, Anne van Kesteren wrote:

> On Wed, 26 Dec 2007 07:25:27 +0100, fantasai  
> <> wrote:
>> Markus Mielke wrote:
>>> *Problem:*
>>>  Allow centering of content within a containing block. Today, we  
>>> only have text-align: center available that only applies to text  
>>> and inline elements. This makes general centering of elements  
>>> (like images) really difficult.
>>>  *Proposal: *
>>>  It would actually be better to create a new property ...
>> I've written this up for the wiki here:
>> There are a number of open issues. I'll paste the summary below,  
>> with my
>> suggestions in **.
>> [...]
> I think it would be good if one of these features exactly matches  
> the behavior of <center>. (I thought that was the idea behind the  
> proposal, at least for some proponents.) It seems that WebKit and  
> Gecko have implemented that as text-align:-webkit-center and text- 
> align:-moz-center respectively. Maybe we should introduce block- 
> center as a value for text-align.

I agree that it would be very useful to have something that can be  
set in one place to center all the blocks that are children or  
descendants of where it is set. Sometimes it is a pain to put auto  
margins on each child, and sometimes you want the child blocks to  
have their own margins in pixels or ems that keep them from getting  
too close too other elements or to the edge.

float:center would also be darn useful.

> -- 
> Anne van Kesteren
> <>
> <>

Received on Wednesday, 26 December 2007 15:56:01 UTC