Re: position: center

>    What?  I don't understand why each individual line of text would be 
> in the vertical centre, therefore overlapping each other.  For 

Not what I said.  Inline text is broken into single line boxes.
These boxes are then justified within their own line according
to the text-align property, and constrained by the block that
contains all the lines.  Trying to vertically justify a single
line can only affect that line.  That is the consequence of the
CSS layout model.

The effect that most people want with vertical centring is 
the analogue of horizontally centring the containing block,
rather than horizontally justifying the text in an individual 
line.  I.e. they want an analogue of:

display: block; margin-left: auto; margin-right: auto; width: <width>

I'm not completely sure that that analogue is not already valid.  I.E.

display: block; margin-top: auto; margin-bottom: auto; height: <height>

(One of the great sources of confusion is that the deprecated <center>
element and align=center attributes simultaneously sets text-align
and margin... auto, in the typical implementation.)

>    Vertical positioning doesn't necessarily require a fixed box size, it 
> simply requires that the size of the box be calculated before rendering 
> can begin or continually reflow while rendering, until complete.  Since 
> this is done anyway as rendering occurs, this should not a problem.

But this is an undesirable behaviour in a medium with the typical writing
speed of a web page as it makes the page difficult to read as it
is rendering.  (I know that most authors use tables with (default) 
options that force delayed rendering, but I consider that an endemic
fault in web page design.)

Received on Tuesday, 27 January 2004 18:19:53 UTC