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

I am not proposing min-(max-)margin, etc. This is not mine.
I personally think that this is overkill.

Your example (good one) will not align "Stuff" vertically as there are no
height defined.

To align it you should have either height set to div class=container
or your should place "container" implicitly in element having display:table
and to be safe you should have display:table-row element also.

| .container {display: table-cell; vertical-align: middle;}
| <div class="container">
|     <div class="tobecenteredvertically">
|     Stuff
|     </div>
| </div>

I mean it is not so obvious and straightforward.

Andrew Fedoniouk.
http://terrainformatica.com


Original Message from: "Adam Kuehn"
|
| Andrew Fedoniouk wrote:
|
| >| ...vertical centering of a block of contents of an unknown height.
| >
| >And how CSS::table-* will help you in this case?
|
| Isn't it obvious?
|
| >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.)
|
| I'm trying to follow your argument here, I really am.  Given this
| markup and CSS:
|
| <div class="container">
|     <div class="tobecenteredvertically">
|     Stuff
|     </div>
| </div>
|
| .container {display: table-cell; vertical-align: middle;}
|
| Are you saying that although .tobecenteredvertically will in fact be
| vertically centered, it shouldn't be?  And then you are using that to
| justify the inclusion of min-(max-)margin, min(max-)padding (and
| associated right, left, top, and bottom properties), plus now a new
| pair of properties that you would call content-align and
| content-valign?
|
| I'm sorry, but I fail to see the logic in requiring implementation of
| 22 new constructs when implementation of the one existing construct
| will get the job done.   This is doubly true since display: table*
| already works with actual table elements, and works with arbitrary
| elements in at least three existing, distributed implementations.  I
| guess I must be too practical or something.  I'm perfectly willing to
| accept that this is how tables work and then use that to my
| advantage, even if it doesn't result in a world of perfect logical
| consistency.
|
| --
|
| -Adam Kuehn
|

Received on Sunday, 3 October 2004 20:40:06 UTC