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

Centering static inline content

Expand Messages
  • arianhojat2000
    Hello, btw thanx Mike Trotman the document( blah.aspx ) for getting date info worked well. Now i am trying to align 2 pieces of info, on 1 line, at the bottom
    Message 1 of 4 , May 2, 2005
      Hello,
      btw thanx Mike Trotman the document('blah.aspx') for getting date
      info worked well.
      Now i am trying to align 2 pieces of info, on 1 line, at the bottom
      of static content like so(without putting each piece in its own
      block) but it does not work...


      <fo:static-content flow-name="my-bottom-sidebar">
      <fo:block>

      //i want this inlined code aligned to the left with some margins
      //margin-left="20px" padding-left="20px" text-align="left" does not
      work
      <fo:inline>
      <xsl:value-of select="$date"/>
      </fo:inline>


      //i want this inlined code centered on same line as info above
      //text-align="center" does not work
      <fo:inline>
      <fo:inline color="black">Page </fo:inline> <fo:inline color="black"
      text-decoration="underline"><fo:page-number/></fo:inline>
      </fo:inline>

      </fo:block>
      </fo:static-content>

      I think because text-align doesnt seem to be a valid attribute for
      inline but only block?
      (http://www.w3schools.com//xslfo/obj_inline.asp)
      Thanx in advance
    • Eliot Kimber
      ... This is a little fo trick: - set text-align-last= justify on your block - put an auto-length space leader between the two parts:
      Message 2 of 4 , May 2, 2005
        arianhojat2000 wrote:
        > Hello,
        > btw thanx Mike Trotman the document('blah.aspx') for getting date
        > info worked well.
        > Now i am trying to align 2 pieces of info, on 1 line, at the bottom
        > of static content like so(without putting each piece in its own
        > block) but it does not work...

        This is a little fo trick:

        - set text-align-last="justify" on your block
        - put an auto-length space leader between the two parts:

        <fo:block text-align-last="justify">
        <fo:inline>This is on the left</fo:inline>
        <fo:leader leader-length="auto" leader-pattern="space"/>
        <fo:inline>This is on the right</fo:inline>
        </fo:block>

        Cheers,

        Eliot
        --
        W. Eliot Kimber
        Professional Services
        Innodata Isogen
        9390 Research Blvd, #410
        Austin, TX 78759
        (512) 372-8155

        ekimber@...
        www.innodata-isogen.com
      • Mike Trotman
        I don t think FOP 0.20.5 supports auto leader.length - but leader.length.maximum= 100% should have the same effect. And if you have any ideas how to really
        Message 3 of 4 , May 3, 2005
          I don't think FOP 0.20.5 supports 'auto' leader.length - but
          leader.length.maximum='100%' should have the same effect.

          And if you have any ideas how to really center some text in the middle
          in XSLFO - let me know.
          Whatever I try to get inline text on a line with a LHS/Center/RHS layout
          the best I can get
          (using XEP) is equal amounts of space either side of the Center text
          - which doesn't necessarily center the text if the LHS and RHS texts
          have different lengths.

          Using FOP I haven't found anything yet that get's even that close.

          Mike

          Eliot Kimber wrote:

          >arianhojat2000 wrote:
          >
          >
          >>Hello,
          >>btw thanx Mike Trotman the document('blah.aspx') for getting date
          >>info worked well.
          >>Now i am trying to align 2 pieces of info, on 1 line, at the bottom
          >>of static content like so(without putting each piece in its own
          >>block) but it does not work...
          >>
          >>
          >
          >This is a little fo trick:
          >
          >- set text-align-last="justify" on your block
          >- put an auto-length space leader between the two parts:
          >
          ><fo:block text-align-last="justify">
          > <fo:inline>This is on the left</fo:inline>
          > <fo:leader leader-length="auto" leader-pattern="space"/>
          > <fo:inline>This is on the right</fo:inline>
          ></fo:block>
          >
          >Cheers,
          >
          >Eliot
          >
          >



          --
          No virus found in this outgoing message.
          Checked by AVG Anti-Virus.
          Version: 7.0.308 / Virus Database: 266.11.2 - Release Date: 02/05/2005
        • Victor Vishnyakov
          Take a look at the following links: http://xslfo-zone.com/faq/xsl-fo/tables/how_to_center_table_cell_content.jsp
          Message 4 of 4 , May 3, 2005
            Take a look at the following links:
            http://xslfo-zone.com/faq/xsl-fo/tables/how_to_center_table_cell_content.jsp
            http://xslfo-zone.com/examples/xsl-fo/tables/center-table-cell-content.jsp
            http://xslfo-zone.com/examples/xsl-fo/tables/align-table-center.jsp

            These examples must help you to center any content using tables.


            Best Regards,
            Victor Vishnyakov
            http://xslfo-zone.com/



            > -----Original Message-----
            > From: XSL-FO@yahoogroups.com [mailto:XSL-FO@yahoogroups.com]
            > On Behalf Of Mike Trotman
            > Sent: Tuesday, May 03, 2005 8:07 PM
            > To: XSL-FO@yahoogroups.com
            > Subject: Re: [XSL-FO] Centering static inline content
            >
            > I don't think FOP 0.20.5 supports 'auto' leader.length - but
            > leader.length.maximum='100%' should have the same effect.
            >
            > And if you have any ideas how to really center some text in
            > the middle in XSLFO - let me know.
            > Whatever I try to get inline text on a line with a
            > LHS/Center/RHS layout the best I can get (using XEP) is equal
            > amounts of space either side of the Center text
            > - which doesn't necessarily center the text if the LHS and
            > RHS texts have different lengths.
            >
            > Using FOP I haven't found anything yet that get's even that close.
            >
            > Mike
            >
            > Eliot Kimber wrote:
            >
            > >arianhojat2000 wrote:
            > >
            > >
            > >>Hello,
            > >>btw thanx Mike Trotman the document('blah.aspx') for
            > getting date info
            > >>worked well.
            > >>Now i am trying to align 2 pieces of info, on 1 line, at
            > the bottom of
            > >>static content like so(without putting each piece in its own
            > >>block) but it does not work...
            > >>
            > >>
            > >
            > >This is a little fo trick:
            > >
            > >- set text-align-last="justify" on your block
            > >- put an auto-length space leader between the two parts:
            > >
            > ><fo:block text-align-last="justify">
            > > <fo:inline>This is on the left</fo:inline>
            > > <fo:leader leader-length="auto" leader-pattern="space"/>
            > > <fo:inline>This is on the right</fo:inline> </fo:block>
            > >
            > >Cheers,
            > >
            > >Eliot
            > >
            > >
            >
            >
            >
            > --
            > No virus found in this outgoing message.
            > Checked by AVG Anti-Virus.
            > Version: 7.0.308 / Virus Database: 266.11.2 - Release Date: 02/05/2005
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.