Re: How to vertically center text and image?

> I think you have to "vertically centre the graphic" by
> knowing the height of the graphic.

Ken,

I do think there is one... There is an attribute called vertical-align
which applies to all inline-level elements. As external-graphic is an
inline-level element, it can be used to solve this problem.

This works in XEP and Antennahouse (not in FOP):

                  <fo:block>
                     <fo:inline> Text </fo:inline>
                     <fo:external-graphic vertical-align="middle"
src="charlie.jpeg"/>
                     <fo:inline> Text </fo:inline>
                  </fo:block>

Best regards,
-----
Klaas Bals  -  Scriptura Development Manager

Scriptura - a WYSIWYG XSL-FO editor: www.inventivedesigners.com/scriptura

Inventive Designers
Direct Phone: +32 - 3 - 8210183
Office Phone: +32 - 3 - 8210170
Office Fax: +32 - 3 - 8210171
Email: Klaas_Bals at inventivedesigners dot com

Received on Wednesday, 26 March 2003 10:55:59 UTC