Re: [xsl] background in block container

Subject: Re: [xsl] background in block container
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Feb 2004 08:00:56 -0500
At 2004-02-17 12:25 +0000, Mark Williams wrote:
Still having problems with backgrounds in block-containers.

The following works as I would expect it to, placing the border on the
region-body's left and top margins and at the require width and height:

<fo:flow flow-name="xsl-region-body">
 <fo:block-container position="absolute" left="0cm" top="0cm" width="19cm"
height="27cm" background-color="rgb(192, 192, 192)" border-color="rgb(0, 0,
0)" border-style="solid" border-width="1pt">
  <fo:block>&#160; </fo:block>

However, if instead of width and height I specify right and bottom
coordinates of 0cms, I thought that, in accordanc with the spec I would get
a borders that would correspond precisely with all of the region-body's
margins (Eg the spec says of the right property: "This property specifies
how far a box's right margin edge is offset to the left of the right edge of
the box's containing block").

Both Antenna House and XEP fill the body region when using your suggested properties:

<fo:block-container position="absolute" left="0cm" top="0cm"
background-color="rgb(192, 192, 192)" border-color="rgb(0, 0,
0)" border-style="solid" border-width="1pt" right="0cm" bottom="0cm">

Instead I get a miniscule block in the top left corner.

Can anyone please tell me why?

Sounds like a bug ... which software are you running? Did you check its list of supported properties to see if they were all supported?

How do I draw a block-container with reference to the bottom and right margins?

Just like you intuited.

I hope this helps.

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

-- Public courses: upcoming world tour of hands-on XSL training events Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22 Hong Kong: 2004-05-17 Germany: 2004-05-24 England: 2004-06-07 World-wide on-site corporate, government & user group XML training!

G. Ken Holman                  mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd. 
Box 266, Kars, Ontario CANADA K0A-2E0     +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness

XSL-List info and archive:

Current Thread