RE: [CSS3 box] Proposal: content-align

The text-align property will already take care of the "left | center |
right" part of the alignment if text is involved.

For the percentage or length values you suggest, does that value
represent the start point, the mid point, or end point of the text?

Paul

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
Behalf Of Manuel Strehl
Sent: Wednesday, September 13, 2006 2:49 AM
To: www-style@w3.org
Subject: [CSS3 box] Proposal: content-align


Hi.


There was some time ago a discussion about vertical alignment of block
elements' content
( http://lists.w3.org/Archives/Public/www-style/2005Jun/0039 ).   I 
looked through CSS 3
box model and haven't found anything to do this kind of job  (it IS
actually working for table cells with vertical-align in a quite similar
way...):

    |-           width            -|

    +------------------------------+ -
    |This is some text that        | |
    |doesn't completely fill       |
    |a block element               |
    |                              | height
    |                              |
    |                              |
    |                              | |
    +------------------------------+ -

                  \   /
                   \ /
                    V

    +------------------------------+
    |                              |
    |                              |
    |    This is some text that    |
    |    doesn't completely fill   |
    |    a block element           |
    |                              |
    |                              |
    +------------------------------+



Therefore my proposal:

Name:            content-align
Value:           [[<percentage> | <length> ]{1,2}
                    | [[top | center | bottom] || [left | center |
right] ]] | auto
Initial:         0% 0%
Applies to:      block elements
Percentages:     refer to width and height of container element

Description:     The bounding box of the content is computed. 
Afterwards it is aligned
                  inside  the containing  block element  according to
the value  of  the
                  content-align property.

E.g.,  'content-align: center;'  means  the rendering just like my
second example above.
This property is somewhat similar to 'fit-position', just without the
'fit' part.

Regards
Manuel

Received on Wednesday, 13 September 2006 05:32:56 UTC