Adam Augusta wrote:
The compliance page gives every indication that using the display-align
property of a block-container to vertically center output should work. Why isn't the output text vertically centered in the 4"x5" area?
FOP 0.20.5
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block-container border-style="solid" display-align="center" wrap-option="no-wrap" text-align="center" position="absolute" top="1in" left="2in" height="5in" width="4in">
<fo:block>The quick brown fox jumps over</fo:block>
<fo:block space-before="10pt">the lazy dog.</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
Hi Adam,
this should work. The only thing that strikes me as slightly unusual is that youve specified wrap-option="no-wrap". Try taking this off. If this fails, try getting rid of the nested blocks and just put the text directly below the block-container. I realise this is far from ideal, but display-align is not fully implemented. One work around would be to put a single column/single row table in there and specify display-align="centre" on the table-cell.
Chris
As usual, Chris gives a thorough response! A couple of notes:
According to the FOP Compliance page[1]:
Object Name Citation Support: Basic Extended
display-align �7.13.4 � Yes partial
�
NOTES:
* Implemented only for table-cell and block-container.
* For table-cell, the "height" attribute must be set for the parent table-row; setting the height of the table or the table-cell results in vertical centering having no effect.
[1] FOP Compliance: display-align compliance info http://xml.apache.org/fop/compliance.html#fo-property-display-align
[2] w3.org: display-align spec http://www.w3.org/TR/xsl/slice7.html#display-align
Also, I'm not sure if display-align="centre" will work :-) and judging from its absence in the spec at that link, I don't think it is... You may want to use the 'merican English spelling "center"...
Web Maestro Clay
p.s. How do you spell 'Centering' in British English?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
