W3C home > Mailing lists > Public > www-xsl-fo@w3.org > March 2003

Re: How to vertically center text and image?

From: <Klaas_Bals@inventivedesigners.com>
Date: Wed, 26 Mar 2003 16:55:27 +0100
To: www-xsl-fo@w3.org
Message-ID: <OF2E8E4A66.6249CBFE-ONC1256CF5.005770CF-C1256CF5.005779A9@inventivedesigners.com>






> 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT