W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2003

absolute-position + bottom +right

From: Mark Lundquist <ml@wrinkledog.com>
Date: Wed, 25 Jun 2003 11:53:56 -0700
To: www-xsl-fo@w3.org
Message-Id: <5FC72250-A73E-11D7-9476-000A95908E0E@wrinkledog.com>

I've been struggling with a simple layout, trying to place something 
relative to the bottom right corner of a page.  Here is my page:

<fo:page-sequence
                 master-reference="single"
             >
         <fo:flow flow-name="xsl-region-body">
             <fo:block-container
                     border-style="solid"
                     width="7in"
                     height="9in"
                 >
                 <fo:block-container
                         absolute-position="fixed"
                         bottom="2.0in"
		     right="1.0in"
                     >
                     <fo:block
                             width="4.0in"
                             border-style="solid"
                         >
                         :::::: I ABSOLUTELY WANT THIS ABSOLUTELY 
POSITIONED! :::::::
                     </fo:block>
                 </fo:block-container>
             </fo:block-container>
         </fo:flow>
     </fo:page-sequence>

The problem: when this FO document is rendered to PDF, the content I 
want positioned relative to the bottom right is instead rendered at the 
top left corner of the page (not offset -- the top left corner of the 
block is at the top left corner of the page).

HOWEVER... if I replace "bottom" with "top", and/or "right" with 
"left", then the renderer does what I think that means: the block is 
positioned 2 in. down from the top, and/or 1 in. in from the left of 
the page (I tried these replacements both one-at-a-time and together).  
So, it's like it honors "top" and "left", but ignores "bottom" and 
"right".

I'm using XEP -- not that I expect it matters.  I'm a newbie, and the 
likelihood of my having bolloxed up something very basic is high, and I 
would hardly expect XEP to have gotten something like this wrong.  
Faute de mieux, I took a shot at it with FOP, and just as with XEP, my 
block ended up stuck up at the upper left.

The borders are there just to help me see what is going on with the 
blocks; similarly, the outermost block-container is just there to give 
me a containing block that I can see.

(Also... I  realize my content here is in the normal flow, not 
static-content.  That's OK.  This isn't a book, it's a promotional 
flyer, and it'll be laid out from XML with "pull model" fashion with 
xsl:call-template).

Any help would be greatly appreciated!

---
Mark Lundquist
Received on Wednesday, 25 June 2003 14:55:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:11 GMT