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

2343Re: [XSL-FO] Centering a block on the page

Expand Messages
  • W. Eliot Kimber
    Oct 29, 2002
      W. Eliot Kimber wrote:
      > Is there a way to center a block on a page in both directions?
      >
      > By using a block-container with a block-container-dimension of 100% and
      > a display-align of center, I can center a contained block of text
      > vertically, but I can't figure out how to also center it
      > horizontally--clearly text-align only applies to inline areas w/in the
      > block.

      I did find one solution, although I'm not sure its the best solution:

      <fo:flow
      display-align="center">
      <fo:block-container
      reference-orientation="-90">
      <fo:block-container
      reference-orientation="90">
      <fo:block-container
      block-progression-dimension="100%"
      inline-progression-dimension="20%">
      <fo:block border-style="solid">this will be centered in middle
      of page</fo:block>
      </fo:block-container>
      </fo:block-container>
      </fo:block-container>
      </fo:flow>

      Cheers,

      Eliot

      --
      W. Eliot Kimber, eliot@...
      Consultant, ISOGEN International

      1016 La Posada Dr., Suite 240
      Austin, TX 78752 Phone: 512.656.4139
    • Show all 17 messages in this topic