xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolay Borisov <n.borisov.l...@gmail.com>
Subject Aligning elements
Date Wed, 29 Nov 2017 19:14:25 GMT

I'm struggling to make fop align my elements the way I want them to be. I have the following

    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Times-cyr"> 
          <fo:simple-page-master master-name="simpleA4" page-height="29.7cm"    
              page-width="21cm" margin-top="2cm" margin-bottom="2cm"            
              margin-left="2cm" margin-right="2cm">                             
              <fo:region-body margin-top="2.1cm"/>                              
              <fo:region-before region-name="xsl-region-before" extent="1cm"/>  
      <fo:page-sequence master-reference="simpleA4">                               
        <fo:flow flow-name="xsl-region-body">                                   
            <fo:block padding="5pt" border-style="solid">                       
                <fo:block >                                                     
                            <fo:block space-after="5pt">                        
                                <fo:inline >                                    
                                    Text Caption 1 N:</fo:inline>               
                                <fo:inline-container width="10em">              
                                    <fo:block border="solid thin" text-align="right">text
                            <fo:block space-after="5pt">                        
                                    Short1 N:</fo:inline>                       
                                <fo:inline-container  width="10em">             
                                    <fo:block border="solid thin" text-align="right">text

And I'd like to make the 2 inlines that contains "text 1" and "text 2" to be aligned on the
same side edge. Currently due to "Short1 N" text being shorter than "Text caption 1N" then
the 2 boxes are not aligned. I tried various things such as setting a margin-right on the
fo:inline elements before the inline-containers. I tried playing with space-after (though
I see it's not fully implemented yet according to the compliance page). I also tried using
position=relative and righ/left attributes of the inline-container tags, again to no avail.
I'm completely lost how am I supposed to achieve this and any help is going to be much appreciated.

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message