W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: Alignment property proposal

From: Brad Kemper <brkemper@comcast.net>
Date: Tue, 6 Nov 2007 08:03:42 -0800
Message-Id: <F9BD7222-696F-4EB4-8D5B-500385C81E74@comcast.net>
To: WWW Style <www-style@w3.org>, Markus Mielke <mmielke@windows.microsoft.com>

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 GMT

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