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 12:10:45 -0500
Message-ID: <4783AE95.9010606@inkedblade.net>
To: Brad Kemper <brkemper@comcast.net>
CC: CSS Style <www-style@w3.org>

Brad Kemper wrote:
> 
> 
> On Jan 7, 2008, at 11:36 AM, fantasai wrote:
> 
>> There was a proposal for pretty much exactly this functionality quite 
>> awhile
>> ago, with slightly different syntax
>>   http://lists.w3.org/Archives/Public/www-style/2004Jan/0218.html
> 
> That's pretty different from what I'm proposing. By the definition 
> given, position:center is a whole new positioning scheme, concerned 
> primarily with making sure the item is both vertically centered and 
> horizontally centered.
> 
> What I proposed was a small, simple extension to position:absolute (and 
> position:fixed, and perhaps position:relative), which would continue to 
> work exactly as it did before, except that in addition to setting the 
> position of one or more of the four edges of the object, you could set 
> the position of the center of the object.
> 
> It would not break any fundamental design principals. It would not break 
> incremental rendering, since positioned items are taken out of the flow.

See http://lists.w3.org/Archives/Public/www-style/2008Jan/0168.html on
incremental rendering.

AFAICT your proposal and "position: center" don't have any fundamental
differences aside from the syntax used to get various results and, in
the less common cases, whether some results are possible. They are both
absolute-positioning schemes and share the same layout advantages and
disadvantages.

I think the position: center scheme is less clear on what happens when
e.g. 'left' is 'calc(50% + 5em)'...

~fantasai
Received on Tuesday, 8 January 2008 17:10:51 GMT

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