Re: Block border/padding behaviour

> 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
http://davidashen.net/

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