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

Re: How to vertically center text and image?

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Wed, 26 Mar 2003 11:04:43 -0500
Message-Id: <5.2.0.9.0.20030326110249.02c368c0@pop.storm.ca>
To: www-xsl-fo@w3.org

At 2003-03-26 09:32 -0500, I wrote:
>I don't think there is a way to "vertically centre the text" ... I think 
>you have to "vertically centre the graphic" by knowing the height of the 
>graphic.

I was wrong ... Klaas Bals <Klaas_Bals@inventivedesigners.com> pointed out 
the use of vertical-align=, and I ended up with the same visual result using:

   <block space-before="1cm" font-size="20pt">
     vertical: with a long enough sentence that will wrap to the next line
      in such a nature
     <external-graphic vertical-align="middle"
       src='url("tight.bmp")'/>
     to show how the text interacts with the image that has been aligned
   </block>

Thanks, Klaas!

....................... Ken


--
Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO
                              North America:      June 16-20, 2003

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
Received on Wednesday, 26 March 2003 11:04:53 GMT

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