[xep-support] Center a table on a page

Alexander Peshkov peshkov at renderx.com
Tue Sep 30 00:29:45 PDT 2003


Hello Detlef,

You can center your table by wrapping it in another table like this:

<fo:table width="100%">
  <fo:table-column column-width="proportional-column-width(1)"/>
  <fo:table-column/>
  <fo:table-column column-width="proportional-column-width(1)"/>
  <fo:table-body>
    <fo:table-row>
      <fo:table-cell/>
      <fo:table-cell>

        <!-- place table which has to be centered here -->
        <fo:table border="thin solid black"> 
          <fo:table-body text-align="center">
            <fo:table-row><fo:table-cell><fo:block>Nested table is here</fo:block></fo:table-cell></fo:table-row>
          </fo:table-body>
        </fo:table>

      </fo:table-cell>
      <fo:table-cell/>
    </fo:table-row>
  </fo:table-body>
</fo:table>             

Hope this helps.

Best regards,
Alexander Peshkov                             mailto:peshkov at renderx.com
RenderX

OD> Hi,

OD> I want to center a table on a page.

OD> <fo:block text-align="center">
OD>  <fo:table table-layout="fixed">
OD>   <xsl:apply-templates/>
OD>  </fo:table>
OD> </fo:block>

OD> or

OD> <fo:table table-layout="fixed" text-align="center">
OD>   <xsl:apply-templates/>
OD> </fo:table>

OD> But it works not. What is wrong?

OD> Thanks in advanced,

OD> Detlef Obenaus
OD> Technical Writer

OD> SchlumbergerSema Management GmbH
OD> Otto-Hahn-Straße 36
OD> 63303 Dreieich

OD> Tel.: +49 (0) 69 23 83-33 90

OD> EMail:    DObenaus at frankfurt.sema.slb.com


OD> -------------------
OD> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
OD> in the body of the message to majordomo at renderx.com from the address
OD> you are subscribed from.
OD> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list