xsl-list
[Top] [All Lists]

RE: FO: center a table

2005-12-27 03:52:17
Hi,

I believe you must/can have a fo:block element as the child of  fo:flow element 
and then the fo:
Set this with text-align="center" attribute for the fo:block. 

<?xml version="1.0"?>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="master"
                               page-height="845pt"
                               page-width="598pt">
          <fo:region-body margin-left="50pt"
                          margin-top="50pt"
                          margin-bottom="50pt"
                          margin-right="50pt"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="master">
        <fo:flow flow-name="xsl-region-body">
         <fo:block text-align="center">
          <fo:table width="100pt" table-layout="fixed">
            <fo:table-column column-width="100pt"/>
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>foo</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>

Regards
Kaarle

-----Original Message-----
From: Florent Georges [mailto:darkman_spam(_at_)yahoo(_dot_)fr] 
Sent: 27. joulukuuta 2005 12:21
To: XSL Mulberry list
Subject: [xsl] FO: center a table

  Hi

  I can't figure out how to make this simple task: I have a fo:table in a 
fo:flow, and I have to center the table horizontally in the flow. 
Something like the following, but with centering the table:

    <?xml version="1.0"?>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="master"
                               page-height="845pt"
                               page-width="598pt">
          <fo:region-body margin-left="50pt"
                          margin-top="50pt"
                          margin-bottom="50pt"
                          margin-right="50pt"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="master">
        <fo:flow flow-name="xsl-region-body">
          <fo:table width="100pt" table-layout="fixed">
            <fo:table-column column-width="100pt"/>
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>foo</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>

  Regards,

--drkm



















        

        
                
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>