RE: [CSS3 box] Proposal: content-align

Here is some markup that handles your poem justification example...at least in IE.

<html>
<body>
<div style="background-color: teal; padding: 20px 20px 20px 20px; text-align: justify; text-align-last: justify; text-justify: newspaper;">
Mary had a little lamb,<br>
Its fleece was white as snow.<br>
Everywhere that Mary went,<br>
The lamb was sure to go.
</div>
</body>
</html>




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


Hi again.

Horizontal align: mostly there's no effect, due to the lines completely
filling the space, but in hindsight to XHTML 2's <l> element, there
could be a need for this property, where, e.g., the lines of a poem
don't stretch over the width assigned to the container. So, to be clear,
this is not about 'text-align', like Anne correctly stated, but how to
handle the remaining space between the content bounding box and the
width and height of the container.

Percentage values: I would like it to be read like the percentage values
of "fit-position", where, with increasing percentages, the position
inside the bounding box is wandering. So, 0% 0% is equal to aligning the
upper left, 100% 100% aligning the lower right corner with the box
defined by width and height of the container.

Some time ago I was asking the list about padding:auto, but we agreed
that that's not the right way to handle it. The suggested inner box from
Werner on the other hand is something that disagrees with my
understanding of separation of content and style, for it would introduce
a <div> or similar just for aligning. Thanks anyway for the comment! But
even then, margin-top:auto will have to be defined (which I would, for
the sake of consistency, welcome!).

Regards
Manuel

Received on Thursday, 14 September 2006 02:25:03 UTC