Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] table align center

Expand Messages
  • Chris Bowditch
    ... The only trouble with this solution is that most Formatters dont yet implement fo:inline-container. Chris
    Message 1 of 5 , Sep 3, 2004
    • 0 Attachment
      Victor Vishnyakov wrote:

      > The most accurate solution is to put the whole table into the inline
      > container. Thus parent block's text-align and text-align-last atrributes
      > with value center would do what you want.

      The only trouble with this solution is that most Formatters dont yet implement
      fo:inline-container.

      Chris
    • Chris Bowditch
      ... I realised that I made a couple of mistakes in my sample: width on should have been column-width and the middle should
      Message 2 of 5 , Sep 3, 2004
      • 0 Attachment
        Chris Bowditch wrote:

        > carlos müller wrote:
        >
        > > How Can I align a table at center horizontally? I don´t know the size of
        > > her
        > > in design time.
        >
        > To horizontally centre a table, place it inside an outer table like this:
        >
        > <fo:table table-layout="fixed">
        > <fo:table-column width="proportional-column-width(1)"/>
        > <fo:table-column width="proportional-column-width(1)"/>
        > <fo:table-column width="proportional-column-width(1)"/>
        > <fo:table-body>
        > <fo:table-row>
        > <fo:table-cell>
        > </fo:table-cell>
        > <fo:table-cell>
        > <!-- place your table here -->
        > </fo:table-cell>
        > <fo:table-cell>
        > </fo:table-cell>
        > </fo:table-row>
        > </fo:table-body>
        > </fo:table>

        I realised that I made a couple of mistakes in my sample:

        width on <fo:table-column> should have been column-width

        and the middle <fo:table-column> should not have a column-width specified to
        allow the column to be big enough for the inner table.

        Chris
      Your message has been successfully submitted and would be delivered to recipients shortly.