Re: absolute-position + bottom +right

At 2003-06-25 11:53 -0700, Mark Lundquist wrote:
>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:block-container
>                         absolute-position="fixed"
>                         bottom="2.0in"
>                      right="1.0in"
>                     >
>                     <fo:block
>...
>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).

Correct ... because you have specified "fixed" it is relative to the 
page.  However, not having specified top and left, those edges are 
considered 0 and are coincident with the edge 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".

No, when you don't specify top and left, the top and left are coincident 
with the edges to which they apply.

>Any help would be greatly appreciated!

Note in 6.5.3 the paragraph: "Any reference-level-out-of-line areas 
returned by the children of the fo:block-container are handled as described 
in [6.10.2 fo:float]."  Then, looking in 6.10.2 you will see: "The 
padding-, border-, and content-rectangles of the block-areas generated by 
fo:float all coincide. That is, the padding and border are zero at all 
edges of the area."

Therefore, you cannot successfully play with borders or padding for 
absolutely positioned block containers.  Only the content *within* the 
block-container can have borders ... that is why a block with a border 
inside the block-container would show the border.

I started this response last night and have just returned to my email after 
24 hours ... I see you have other messages to the list but wanted to finish 
this one off first and send it.

Welcome to the FO community ... I'm sure you'll be able to figure all this 
out ... my students have been successfully using XSL-FO to meet their needs 
where possible.

I hope this has helped.

..................... Ken


--
Upcoming hands-on courses: XSLT/XPath North America: Aug 12, 2003
-                          XSL-FO     North America: Aug  4, 2003

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X              Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:    http://XMLGuild.info
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc

Received on Thursday, 26 June 2003 21:05:07 UTC