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

Re: positioned elements: center

From: Brad Kemper <brkemper@comcast.net>
Date: Tue, 8 Jan 2008 20:27:01 -0800
Message-Id: <04264D0E-8689-47EE-A885-BA67E9850B5F@comcast.net>
Cc: CSS Style <www-style@w3.org>
To: John Oyler <johnoyler.css@gmail.com>

On Jan 8, 2008, at 8:02 AM, John Oyler wrote:

> These are problematic. 0% on each centers the element? So if I want  
> it to the left or above center, I have to use negative numbers? I  
> don't like that. Offsetting the center of an element is nice, but  
> it should be offset from the top, so that center: 50% centers the  
> thing. For an element that is height:10%, setting center-y:5%  
> should have the top edge lined up with that of the parent element.  
> This seems more intuitive for me.

Actually that was my first instinct, until I realized that if  
"center" was to be equivalent to "left" , "right", "top", or  
"bottom", then its namestake value should be 0. In other words,  
"bottom:0" means the bottom edge goes all all the way to the bottom  
of its container, "left:0" means the left edge goes all the way to  
the left of its container, so it makes sense from that viewpoint for  
"center:0" to mean the center is aligned with the center of its  

But I can see your point too.
Received on Wednesday, 9 January 2008 04:27:25 UTC

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