[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: FO: center a table
Sorry, I responded to the response but not the original post, so I
didn't see that the original poster already had a test example.
At 2005-12-27 11:21 +0100, Florent Georges wrote: 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: The following change to your example works just fine. I added a table-and-caption to centre the table, then I added a text-align="start" to start-align the table contents, and I turned on the border to see that it was, indeed, in the centre of the line. I hope this helps. . . . . . . . . . . Ken <?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-and-caption text-align="center"> <fo:table width="100pt" table-layout="fixed" text-align="start" border="solid 1pt"> <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:table-and-caption> </fo:flow> </fo:page-sequence> </fo:root>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|