XSL-FO table problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesm6162
    New Member
    • Mar 2007
    • 16

    XSL-FO table problem

    Hi I have the following XSL-FO document that I'm testing with the FOP processor.

    The table I put in, however, is completely stuck to the left side of the body-region, regardless of which margins or paddings I insert. How do I indent the whole table?

    This is extremely frustrating.

    Thanks

    Code:
    <fo:flow flow-name="xsl-region-body">
    			<fo:block space-before="5mm" margin="5mm" border-style="groove" border-width="0mm" border-color="blue" border-bottom-width="1px" border-top-width="1px">
    
    			<fo:table table-layout="fixed" border-color="black" border-width="1px" border-style="solid">
    				<fo:table-column margin-left="20mm" column-width="50mm" />
    				<fo:table-column column-width="70mm" />
    				<fo:table-column column-width="60mm" />
    				<fo:table-body>
    					<fo:table-row >
    						<fo:table-cell border-color="black" border-width="1px" border-style="solid">
    							<fo:external-graphic src="sof3-p.jpg" height="40mm" />
    						</fo:table-cell>
    						<fo:table-cell>
    							<fo:block font-size="15pt" color="#000033">SOLDIER OF FORTUNE</fo:block>
    						</fo:table-cell>
    						<fo:table-cell>
    							<fo:block color="#000033" background-color="#E0E0FF" padding="1mm" padding-left="5mm">Technical Specifications</fo:block>
    							<fo:block padding="1mm" background-color="#303030">
    								<fo:inline color="white" >Title:</fo:inline>
    								<fo:inline color="#B0B0B0" >Some Title</fo:inline>
    							</fo:block>
    							<fo:block padding="1mm" background-color="#606060">
    								<fo:inline color="white" >Platform:</fo:inline>
    								<fo:inline color="#B0B0B0" >Some Platform</fo:inline>
    							</fo:block>
    						</fo:table-cell>
    					</fo:table-row>
    				</fo:table-body>
    			</fo:table>
    			</fo:block>
    		</fo:flow>
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    Sorry the best I can offer are guesses.

    1. First off have you tried setting the margin or padding attributes in the table tag it self?

    2. Second have you tried removing the table-layout="fix" attribute?

    3. Have you tried setting just one margin, padding, or spacing attribute in the block tag at a time? Have multiple conflicting position values set at the same time can cause problems.

    4. There are some examples here that might help.
    http://www.w3schools.c om/xslfo/xslfo_blocks.as p

    Comment

    Working...