AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML Technics

Margin / Indent

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  I specified padding-before="xx%" as follows because I thought that the value of padding-before became a ratio to the height of fo:table-cell, however the result seems to be different from my forecast. How does XSL Formatter calculate it?
<fo:table-body> 
  <fo:table-row>
    <fo:table-cell padding-before="1%">
      <fo:block>...
[No.2005032501]
A. 

In 7.29.15 "padding" of the W3C Recommendation, it is described as follows:

CSS2 Definition:

Value: <padding-width>{1,4} | inherit
Initial: not defined for shorthand properties
Applies to: all elements
Inherited: no
Percentages: refer to width of containing block
Media: visual

"Percentages" of padding-before is a ratio to the width of the containing block according to this description. However, you can specify the ratio to the height of fo:table-cell by specifying from-nearest-specified-value as follows:

<fo:table-cell padding-before="from-nearest-specified-value(height) * 0.01">

Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.