Re: Block border/padding behaviour

Many thanks to David and Greg.

Setting margin-right='0pt' did create the effect I was after (although 
produced some strange overlaps with borders on the next cell in my table).

I shall have to revisit my (obviously flawed) understanding of derived 
traits and margins (which I thought were properties).
Also I'll have to check the difference between margin-end and 
margin-right (or see whether it's just a processor implementation 
difference).

It looks like I'll also have to do a bit more work on getting my 
implementation of styles consistent between XSL-FO and HTML/CSS.

(Having worked on the formatting of corporate reports for over 10 years 
and XSL-FO for the last 18 months
I still find the XSL-FO specification over-complex in 'basic' areas 
(e.g. margins) and deficient or unnatural in 'common' ones (e.g. 
justification / leaders).
Maybe I'm trying to fit it to the wrong perceptual model.)

Once again - thanks for the fast, clear and accurate response.

David Tolpin wrote:

>>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/
>  
>

-- 
Datalucid Limited
8 Eileen Road
South Norwood
London SE25 5EJ
tel :0208-239-6810
mob: 0794-725-9760
email: mike.trotman@datalucid.com
UK Co. Reg:   	4383635
VAT Reg.:   	798 7531 60

Received on Wednesday, 29 October 2003 19:32:04 UTC