Jump to content

fo:block inside fo:table-cell bounded smaller than cell


Recommended Posts

Hello all,

I'm trying to create a 2 part footer, so created a 3-cell table in the footer of my pages (mirror margins for page and model number with space in between). When I text-align left or right, the text aligns to the left or right of the text box, but not the entire table cell (looks pretty much still in the middle of each cell). How do I get it to go to the left or right borders of the actual cells?

Thanks

Bryon

<xsl:template name="insertBodyOddFooter"> <fo:static-content flow-name="odd-body-footer"> <fo:block xsl:use-attribute-sets="chapter_footer"> <xsl:call-template name="OddChapterFooter" /> </fo:block> </fo:static-content> </xsl:template>

 

<xsl:template name="OddChapterFooter"> <fo:block> <fo:table width="100%"> <fo:table-column column-number="1" column-width="40%" /> <fo:table-column column-number="2" column-width="20%" /> <fo:table-column column-number="3" column-width="40%" /> <fo:table-body> <fo:table-row height="10mm"> <fo:table-cell margin-left="0pt" margin-right="0pt"> <fo:block margin-top="5pt" text-align="left"><xsl:value-of select="$productName"/></fo:block> </fo:table-cell> <fo:table-cell margin-left="0pt" margin-right="0pt"> <fo:block margin-top="5pt" text-align="center"> </fo:block> </fo:table-cell> <fo:table-cell margin-left="0pt" margin-right="0pt"> <fo:block margin-top="5pt" text-align="right"><fo:page-number/></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </xsl:template>

 

<xsl:attribute-set name="chapter_footer"> <xsl:attribute name="margin-right">56pt</xsl:attribute> <xsl:attribute name="margin-left">56pt</xsl:attribute> <xsl:attribute name="margin-bottom">10mm</xsl:attribute> <xsl:attribute name="border-top-width">1pt</xsl:attribute> <xsl:attribute name="border-top-style">solid</xsl:attribute> <xsl:attribute name="border-top-color">black</xsl:attribute> <xsl:attribute name="font-family">Sans</xsl:attribute> <xsl:attribute name="font-weight">normal</xsl:attribute> <xsl:attribute name="font-size">12pt</xsl:attribute> <xsl:attribute name="color">black</xsl:attribute> </xsl:attribute-set>

Link to post
Share on other sites
  • 3 weeks later...

Figured out the problem. IN xsl-fo, the fo:block inside fo:table will inherit the properties of the fo:block containing fo:table. Since the parent fo:block had a margin of 56pt, the child table inherited the same property, and indented the block x2. I ended up setting the margin to -56pt to offset.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...