Loading ...
Sorry, an error occurred while loading the content.
 

Problem with nested blocks and spilling into parent's padding area

Expand Messages
  • analogue
    This question is pretty self-explanatory if you take a quick peek at the output of this XSL-FO. Basically, I can t get a nested block with padding to stop from
    Message 1 of 1 , Apr 2 9:35 PM
      This question is pretty self-explanatory if you take a quick


      peek at the output of this XSL-FO. Basically, I can't


      get a nested block with padding to stop from spilling its


      border-rectangle out of it's parents content-rectangle.


      I'm using the latest Apache FOP btw. I've twiddled with


      'space', and looked at inline-progression.width (??).


      Nothing really stood out while browsing the W3C spec but


      I can now confidently say that I know what an


      allocation-rectangle is!! woohoo!




      Thanks,


      sp




      ========================================================




      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">


      <fo:layout-master-set>


      <fo:simple-page-master master-name="my-page">


      <fo:region-body margin="1in"/>


      </fo:simple-page-master>


      </fo:layout-master-set>


      <fo:page-sequence master-reference="my-page">


      <fo:flow flow-name="xsl-region-body" font-family="Times">




      <!-- Plain empty block with 1cm padding -->


      <fo:block border="solid black" padding="1cm" space-after="1cm">


      <fo:block>I am a block and my name is Blackie. I have 1cm of
      padding all around</fo:block>


      </fo:block>




      <!-- Block w/ padding w/ child no padding -->


      <fo:block border="solid green" padding="1cm" space-after="1cm">


      <fo:block>My name is Greenday and I'm the same as Blackie
      except that I have one child, BlueMesa</fo:block>


      <fo:block border="solid blue">


      <fo:block>BlueMesa here..I'm a plain old block with no
      padding. Everything looks fine</fo:block>


      </fo:block>


      </fo:block>




      <!-- Block w/ padding w/ child w/ padding -->


      <fo:block border="solid red" padding="1cm" space-after="1cm">


      <fo:block>I'm RedPlanet and I also share formatting tags with
      Blackie.</fo:block>


      <fo:block border="solid orange" padding="1cm">


      <fo:block>OrangeTwist here. I'm the same as BlueMesa but
      have a 1cm padding. My padding of 1cm for some reason has caused my
      borders to grow outward by 1cm splilling into RedPlanet's padding
      area. How do I make my borders observe RedPlanets padding? I want to
      look just like GreenDay/BlueMesa but have a 1cm padding of my own.
      </fo:block>


      </fo:block>


      </fo:block>




      </fo:flow>


      </fo:page-sequence>


      </fo:root>
    Your message has been successfully submitted and would be delivered to recipients shortly.