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

Re: Block border/padding behaviour

From: David Tolpin <dvd@davidashen.net>
Date: Wed, 29 Oct 2003 22:47:56 +0400 (AMT)
Message-Id: <200310291847.h9TIluqd012830@adat.davidashen.net>
To: www-xsl-fo@w3.org

> I am trying to produce a block with the background-color filled but with 
> content leaving a '12pt' gap (filled with background-color) on the end edge.
> I expected to achieve this by specifying a padding-end of '12pt' and 
> text-align='right'.
> This works perfectly in HTML + CSS.

In XSL, opposite to CSS, margin is a derived trait, and it's default value
is 'indent minus padding minus border'.  You'll need to add margin-end="0pt" to
the block's attributes to get what you want.

> However both FO processors I have tried (FOP + XEP) ADD the padding 
> space  to the block width (which I have tried both specified and 
> unspecified)

Attribute 'width' is not applicable to 'block'. Specifying it does not
change anything but behaviour of the block's descendants which explicitely
inherit this attribute's value.

David Tolpin
Received on Wednesday, 29 October 2003 13:52:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:28 UTC