J.Pietschmann wrote:
john farrow wrote:
I have a question. If you don't use relative-position, how would you
position one block over another, for instance if you wanted to
position some
text over an image, and you wanted this to occur in the normal flow on a
page ?
My normal practice is to use two absolute-positioned block containers
within another normally-positioned block container with
relative-position="static". That is, the root block container
establishes a new reference area and the two child block containers are
then absolutely positioned with respect to their containing reference
area (which is itself in the normal flow of blocks).
Here's my test, which gives the same results with XSL Formatter 2.5 and
XEP 3.77:
<fo:block
font-family="sans-serif"
font-size="24pt"
line-height="110%"
space-before="12pt"
>Test of overlayed blocks using nested absolutely-positioned
block containers.
</fo:block>
<fo:block-container
relative-position="static"
absolute-position="auto"
text-align="center"
display-align="center"
background-color="gray"
inline-progression-dimension="2.5in"
block-progression-dimension="2.5in"
>
<fo:block-container absolute-position="absolute"
left="0pt"
top="0pt"
z-index="1"
background-color="yellow"
inline-progression-dimension="2in"
block-progression-dimension="2in"
border-style="solid"
border-width="0.5pt"
border-color="blue"
><fo:block>This is within a block container with z-index
"1"</fo:block>
</fo:block-container>
<fo:block-container absolute-position="absolute"
left="0.5in"
top="0.5in"
z-index="2"
background-color="silver"
inline-progression-dimension="1in"
block-progression-dimension="1in"
border-style="solid"
border-width="0.5pt"
border-color="green"
><fo:block>This is within a block container with z-index
"2"</fo:block>
</fo:block-container>
</fo:block-container>
<fo:block
font-family="serif"
font-size="26pt"
line-height="110%"
space-before="12pt"
start-indent="0.5in">This is after the block
containers.</fo:block>
</fo:flow>
--
W. Eliot Kimber
Professional Services
Innodata Isogen
9030 Research Blvd, #410
Austin, TX 78758
(512) 372-8122
eliot@xxxxxxxxxxxxxxxxxxx
www.innodata-isogen.com