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

Re: absolute-position + bottom +right

From: Mark Lundquist <ml@wrinkledog.com>
Date: Fri, 27 Jun 2003 11:22:31 -0700
To: www-xsl-fo@w3.org
Message-Id: <50DC664C-A8CC-11D7-9476-000A95908E0E@wrinkledog.com>

On Thursday, June 26, 2003, at 06:05 PM, G. Ken Holman wrote:

>
> 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.

Got it!  David Tolpin set me straight on this one.  My mistake was in 
thinking that absolute-position fixed the positions of only the edges 
called out by "top", "bottom" etc.  For some reason I expected that any 
edges not mentioned would "float" (so to speak -- not the technical 
term I know), that is, that they would be computed from the content 
height and width, probably because I had observed the right and bottom 
edges being so computed in the absence of any absolute positioning.  I 
didn't see why the top and left edges should be any different, but I 
think now I do -- they are special because of the stacking model, 
because they come first (in the block-progression-dimension and 
inline-progression-dimensions, respectively).  Am I on the right track?

IMQHO, I don't think 7.5.1 is absolutely clear about this (ipso 
facto... it wasn't absolutely clear to me :-).

I think maybe I also now understand the difference between "absolute" 
and "fixed", but if so that's another aspect in which 7.5.1 could be 
worded more clearly.  Then again, maybe I don't really understand the 
difference after all :-)  Is the only difference the frame of reference 
for top/bottom/left/right, being in the case of "absolute" the edges of 
the containing area (and shouldn't the spec rather read "content 
rectangle of the area's containing area"?), but those of the viewport 
in the case of "fixed"?

> 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.
>

Sorry... I think one or the other of us has lost track of something :-) 
  There was no question about padding here.  I did ask a question about 
padding in another post... but that question did not involve 
absolutely-positioned objects.

> 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 ...

Thanks!

> I'm sure you'll be able to figure all this out...

Thanks, and I hope you are right about that :-)

~ML
Received on Friday, 27 June 2003 14:22:36 GMT

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