Re: [xsl] background in block container

Subject: Re: [xsl] background in block container
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Feb 2004 14:31:11 -0500
At 2004-02-16 19:11 +0000, Mark Williams wrote:
I've tried (I think) what you suggested, that is to control the border an
background colour from the page's region-body.

I've tried the following:

<fo:region-body margin-top="2.53968253968254cm"
margin-left="2.87393298059965cm" margin-right="3.02393298059965cm"
margin-bottom="2.53968253968254cm" background-color="rgb(226, 226, 226)"
border-color="rgb(0, 0, 0)" border-style="solid" border-width="1pt" />

This gives me a nice grey background, but it doesn't enclose it in a border.
Have you any idea why?

The specification says there are no borders on regions.


Also, I would like to be able to control where the borders start (ie not
merely around the margins of the page) eg if the left margin is 3cms from
the left edge of the page, I might want the border and background to start
1cm from the left edge of the page.  I tried adding some padding, but it
seemed to make no difference.

There is no padding on regions.


Ref: 6.4.13: "In version 1.0 of this Recommendation, the values of the padding and border-width traits must be "0"."

Is there an easy way to achieve this.

Vendor extensions may offer you borders on regions, but the specification does not.


Have you tried a background image of a coloured box?

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.           http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0     +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness   http://www.CraneSoftwrights.com/s/bc


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread