Re: Alignment property proposal

On Nov 6, 2007, at 7:15 AM, Markus Mielke wrote:

> 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.

Since images are inline, they are also affected by "text-align:  
center" aren't they? For block level, we have the "auto" value for  
left and right margins, but what we lack is a "float:center" that  
would center while shrink-wrapping contents of intrinsic or arbitrary  
widths. There have been several times when I have wished for such a  
thing and had to use complicated work-arounds for not having it.

What is even more sorely missed (at least by me) is a way to  
vertically center an element inside of another element.  Table cells  
are about the only way to do so, unless you know the (fixed) height  
of at least one of the elements ahead of time. There is no equivalent  
"auto" value for top and bottom margins.

Received on Tuesday, 6 November 2007 16:04:00 UTC