Subject: Re: [xsl] XSL-FO alignment|
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 May 2006 07:56:01 -0400
G. Ken Holman wrote:At 2006-05-04 00:09 +1000, Kamal Bhatt wrote:No, I want it outside of the text. I am basing this fo on a windows doc and that is what we do.<fo:block font-family="Courier" font-size="10pt" space-before="6pt" space-after="6pt" text-align="left" border-style="solid" border-width="0.25pt" padding-left="4pt" padding-right="4pt" padding-top="6pt" padding-bottom="6pt" line-height="15pt">
According to XSL-FO 1.0 Section 5.3.2, your specification above will draw the border *outside* of the parent boundary limits ... unlike CSS. This guarantees that the text of the border block lines up with the text of an adjacent unbordered block. If you wanted the border to line up with the text, use margin-left="0pt" in addition to your other properties.
On a related note, (and maybe someone here doesn't know this) am I correct in saying that the way word defines points, and even cm different to FO and everyone else?
Firstly, I would am still confused about the difference between space-before and padding-before and padding-top. If someone could explain that to me, that would be great.
The space-before= property defines the space between the adjacent block area and the area's border rectangle (which is the outside edge of the border).
The padding-before= and padding-top= both specify the distance between the area's padding rectangle (which is the inside edge of the border) and the area's content rectangle. The only difference between padding-before= and padding-top= is that the use of writing-direction-dependent values of before/after/start/end are portable across different languages while the CSS heritage top/bottom/left/right are biased to left-to-right/top-down writing directions.
So for english it does n't matter what I use, but I should probably use before/after/start/end?
What about space-* vs padding-*?
Then add margin-left="0pt" to ensure that the border does not "push out" such that its context text aligns with the text of neighbouring blocks.That sounds like what I want to do.
-- Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16 Also for XSLT/XSL-FO training: Minneapolis, MN 2006-07-31/08-04 Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25 Also for XSLT/XSL-FO training: Copenhagen,Denmark 2006-05-08/11 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal