Re: positioned elements: center

On Jan 6, 2008, at 3:03 AM, David Woolley wrote:

>
> Brad Kemper wrote:
>> I don't know if this subject has been broached before...
>
> Often!  Probably about every 9 months.

I am speaking specifically of "center" as an alternative to "left",  
"right", "top", and "bottom" for absolutely positioned elements, not  
of centering or alignment in general.

If it is brought up every 9 months, why is such a simple thing not  
implemented yet? I'm guessing that something that is requested so  
often might be kind of useful. Maybe, just maybe, there are good  
reasons why it is being requested so much.

> The normal way of centering is with margin auto,

The normal way of aligning to the right is with float:right, text- 
align:right, or margin-right. That doesn't prevent us from having  
right:[distance value] as a property/value pair for absolutely  
positioned items.

> but that doesn't work for normally positioned items when done  
> vertically, because container height isn't known (you tend to get  
> circular dependencies).  I can't remember whether or not it works  
> for absolute positioned items, but you should probably check that

I did. It does not. And in regard to using "center" as a property of  
absolutely positioned elements, there are no circular dependancies.

> before searching the archives for the remaining discussion.

I didn't find anything that matched this proposal, but that doesn't  
mean it isn't there. I did find a lot of discussion about centering  
things, and aligning centers, but nothing about "center" as an  
alternative to the edge properties in absolute positioning. Feel free  
to point me to discussions I might have missed with that specifically.

>
>
>
> -- 
> David Woolley
> Emails are not formal business letters, whatever businesses may want.
> RFC1855 says there should be an address here, but, in a world of spam,
> that is no longer good advice, as archive address hiding may not work.
>

Received on Sunday, 6 January 2008 19:01:52 UTC