Block alignment vs. text alignment

View: New views
1 Messages — Rating Filter:   Alert me  

Block alignment vs. text alignment

by dahepe :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

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:

                                                                          Name
                                                                          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>Name</fo:block>
  <fo:block>Street 123</fo:block>
  <fo:block>12345 Very long city name</fo:block>
</fo:block>

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


Any suggestions are highly appreciated,
Daniel