W3C home > Mailing lists > Public > www-style@w3.org > January 2008

Re: positioned elements: center

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 08 Jan 2008 11:44:29 -0500
Message-ID: <4783A86D.3000901@inkedblade.net>
To: Brad Kemper <brkemper@comcast.net>
CC: David Woolley <forums@david-woolley.me.uk>, CSS Style <www-style@w3.org>

Brad Kemper wrote:
> On Jan 7, 2008, at 3:01 PM, David Woolley wrote:
>> My guess, in the case of vertical centering, the problem is the problem is
>> that it breaks incremental rendering. ...
> We already have vertical centering in absolutely positioned elements. Of 
> top or bottom edges, by setting them to 50%. The proposal would let you 
> set the center of an element in exactly the same way as you currently 
> center any of the edges. Or set it to any other value that you can set 
> edges to, using the same units. 
> So don't "guess" what the imaginary problems are that would allow you to 
> argue against it, just because you are compelled to argue against 
> everything, David. There is no problem with this proposal, and the 
> implementors could implement it in their sleep, tonight, if they so chose.

Actually, David Woolley's point is valid. Vertical centering "breaks"
incremental rendering even in absolute positioning not because the
containing block's height is unknown but because the height of the
content is unknown. I believe that's why in CSS2.1 'auto' margins
can't vertically center absolutely-positioned non-replaced content,
even though they can center replaced content (e.g. images).

This doesn't mean we shouldn't consider vertical centering: I think
vertical centering is an important ability to include in CSS (outside
of table cells). But however we do it, it is going to "break" incremental
rendering in that the final position of earlier content won't be known
until later content is loaded. As long as most designers don't use it on
the main content of long pages, though, it shouldn't be a huge problem--
and I don't expect that they will. Vertical centering is mostly useful
for short bits of content in navigation and on pages that fit above the

Advanced Layout breaks incremental rendering in a much more troublesome
way, because it reorders content and is expected to affect almost all
content on long pages.

Received on Tuesday, 8 January 2008 16:44:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:33 UTC