vertical align and table-* was: Re:Box model: min-margin......

Hi, Adam,

| ...vertical centering of a block of contents of an unknown height.

And how CSS::table-* will help you in this case?

Probably you think that vertical-align would help in this case? No!

'vertical-align' defines property of element itself and not a property of a
container.
(Yes, there is an unnatural and logically strange CSS's exception in
interpretation of this for table cells.)

What you do need is 'content-align' and 'content-vertical-align' attributes.

See <img style="vertical-align:bottom"> is a definition of image itself -
instruction where to place its stuff relative to line-box. On other side <td
valign=bottom> is a property of a container and being applied will change
position of *group* of elements.

If we would have content-align and content-valign attributes we will be able
to:

1) emulate easily and exactly <TD valign=bottom>behaviour.
2) do not have so strange,complex and artificial margin: auto as e.g.
content-align:right tells how to align *blocks* and not text inside them.
These two aligns are completely different stuff
3) do not use tables for alignment as *any* container can align its content
safely.

And together with, again, container's attribute 'flow'  (left-to-right,
right-to-left, top-to-bottom, ...)
we will be able to create "table alike" layouts easily, naturally and
without need of DOM table-* transformations (as they say "hidden", but...)

align(ment) and content-align(ment) has two different physical meanings in
implementation.

align happens during layout of element itself and content-align occurs at
final pass of layout algorithm of a container or document itself - when all
heights/widths are known. content-alignment do not change physical
dimensions of elements - it just moves them congruently.

BTW:  computation of my %% units happens also as a final adjustment and they
can be for content alignment purposes instead of content-align.

Andrew Fedoniouk.
http://terrainformatica.com


Original Message from: "Adam Kuehn"

| Andrew Fedoniouk wrote:
|
| >About dispaly: table-*. Being applied will dramaticly modify underlying
DOM.
| >Too artificial and complex in interpretation and in implementation.
| >Plus it seems nobody really needs them.
| >My guess: will not be implemented.
|
| Nobody needs them?
|
| In my experience, this is the second most requested feature that CSS
| developers wish IE would support.  (Support of CSS2 selectors,
| especially > and +, is the most requested.)  Consistent
| implementation of display: table* would make easy the one thing that
| is otherwise very difficult in CSS: vertical centering of a block of
| contents of an unknown height.  Most developers who need this feature
| currently just throw in an actual table and grit their teeth about
| screwing up the document structure.
|
| Personally, I'll celebrate at least a little bit when MS finally sees
| the light on this one.
|
| --
|
| -Adam Kuehn
|

Received on Sunday, 3 October 2004 17:50:54 UTC