You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Biying Huang <bi...@synthematix.com> on 2002/11/11 22:25:38 UTC
how to center a table horizontally on the page
Hi, everyone:
I have a table which has dynamic table-width. I need to put it in the
center of the page horizontally so I put the fo:table in a fo:block and
set text-align="center" to the fo:block. But this doesn't work. The
table is always on the left. Here is my code:
<fo:block text-align="center">
<fo:table>
....
</fo:table>
</fo:block>
Thank you very much for any advices.
Biying
Re: how to center a table horizontally on the page
Posted by Oleg Tkachenko <ol...@multiconn.com>.
Biying Huang wrote:
> I have a table which has dynamic table-width. I need to put it in the
> center of the page horizontally so I put the fo:table in a fo:block and
> set text-align="center" to the fo:block. But this doesn't work. The
> table is always on the left.
text-align is about aligning *inline* content.
In a pure xsl-fo exist at least 2 different methods of centering a table
on a page, both are actually tricks and unfortunately FOP doesn't
support both of them. Therefore the only way is using a blind table, see
http://marc.theaimsgroup.com/?l=fop-user&m=102952965830886&w=2.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel