Re: position: center

On Tue, 27 Jan 2004 12:28:55 +1100, Lachlan Hunt 
<lachlan.hunt@iinet.net.au> wrote:
>    There already exists a way to center content horizontally using the
> text-align property and there needs to be a similar property that works
> vertically, which accepts the four values: top, middle (or center?),
> bottom and justify.
>
>    This property would work similarly to text-align, except it is
> applied vertically instead of horizontally and could therefore be called
> text-v-align.
>
>    The combination of these two properties would allow an elements
> content to be positoned anywhere within the block including:
>
> |-----------------------------------------------|
> |[top left]       [top center]       [top right]|
> |                                               |
> |[middle left]   [middle center]  [middle right]|
> |                                               |
> |[bottom left]   [bottom center]  [bottom right]|
> |-----------------------------------------------|
>
> plus vertical and horizontal justify properties which are harder to
> illustrate using plain text.
>
> CYA
> ...Lachy!
>


On Tue, 27 Jan 2004 06:28:05 +0000 (GMT), David Woolley 
<david@djwhome.demon.co.uk> wrote:
> The analogous behaviour to text align would be to align the text in
> each rendered line in the vertical centre of that line, not to align
> a whole block.
>
> Aligning a block vertically requires a fixed height, removing a degree
> of freedom, and therefore possibly forcing overflow behaviour when the
> user overrides the font size.  Actually centering frustrates
> incremental rendering or requires text to moved as it is rendered.
>


Okay, these are excellent points. I've been thinking of "text-align" as 
"Horizontal Align", when David's point seems to be saying that it also 
applies to vertical languages. It doesnt change my thought that something 
is needed, but now I'm thinking that we need a new horizontal positioning 
method too. This doesnt make the case for using "position:center", because 
what Lachy said is also true- we should be able to position text visually 
(by block) in any of 9 points.
I dont understand how a seperate vertical justify would work on 
non-vertical languages. I think that text-align still has its own place, 
related to text itself, but a seperate visual alignment property should 
exist.

I dont see how aligning a block vertically would require a height any more 
fixed than normal rendering in which you are left with un-equal margins. 
Usually when the height of a column depends on the length of content in 
another column- cases in which you are unable to provide fixed margins or 
absolute positions, are the times when you would want to use 
vertical-centering. That is, not only do I not see why it would require 
fixed-height, but I dont see that there is nearly as much (though it still 
very much exists) need for it when you do have fixed-height.
I'm not really certain that I'm reading what you are saying correctly.. it 
seems to be written backwards. It sounds more like you mean to say "You 
would only want vertical-align:center if you have forced your column to be 
higher than the expected text to begin with"
Which I suppose it true. I wouldnt call it "fixed height" in all cases, 
but having a background-image always display in full has never been a 
problem with regaurd to horizontal-alignment of text. Sometimes things 
overflow. I was under the impression that overflow rules existed to handle 
that- for example, stretching the containing-block and ignoring 
vertical-align completely (just using padding/margins instead)
Which is exactly how it should be. I would love for my text to start in 
the middle of a block, and as it fills in, to spread out with equal 
margins on the top and bottom, until I type something as long as this (we 
can call that length "too long") and the block is forced to expand, using 
the defined values for padding, rather than the vertical-alignment and 
min-height values.

This might also bring up a need for an "overflow direction" directive 
(horizontal|vertical|both), but that would be subject for another post.

Shouldnt we in the end, be able to align and position our text in all the 
ways we currently can using tables?
I've seen a lot of CSS pages which say that using tables for 
layout/positioning is a bad thing. Until CSS can emulate all that tables 
can do, I can't see that as the case.


-- 
-----------------------
Vincent Starre
thebitman@comcast.net

Received on Tuesday, 27 January 2004 14:35:51 UTC