bthomasj21 Posted September 3, 2013 Share Posted September 3, 2013 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 comment Share on other sites More sharing options...
bthomasj21 Posted September 24, 2013 Author Share Posted September 24, 2013 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 comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now