W3C home > Mailing lists > Public > www-xsl-fo@w3.org > November 2008

Block alignment vs. text alignment

From: dahepe <peger@gmx.net>
Date: Fri, 14 Nov 2008 01:38:21 -0800 (PST)
Message-ID: <20497351.post@talk.nabble.com>
To: www-xsl-fo@w3.org


I'm looking for a way to align a block to right margin of the page while
aligning it's contents to the left margin of the block.

I want my output to look like this:

Street 123
12345 Very long city name

                                                   Very long city name, 14th
of November 2008

That is the address block should be at the right most position (depending on
the actual contents of the block) while the address itself should be aligned
to the left. The date line below is some new block that is aligned to the
right of the page and it's right end should correspond to the right end of
the above address block...

As I don't know how long the actual address may be I cannot use a fixed
indent to position the block correctly.

the corresponding xsl currently looks like, but of course results in the
address block to be aligned to the right:

<fo:block space-after="2em">
  <fo:block>Street 123</fo:block>
  <fo:block>12345 Very long city name</fo:block>

<fo:block text-align="end" space-after="1em">
  Very long city name, <xsl:apply-templates select="package/ship_date" />

Any suggestions are highly appreciated,
View this message in context: http://www.nabble.com/Block-alignment-vs.-text-alignment-tp20497351p20497351.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Friday, 14 November 2008 09:38:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:32 UTC