I am using xsl-fo to render a PDF. I need to create a table header for my TOC that has one element(“Chapter Contents”) on the left and the other element(“Page”) on the right, and the two elements appear on the same line.
Currently, I create two fo:inline elements to wrap the text, which are then be wrapper under a fo:block element. I have my xslfo code looks like:
<fo:block text-align="left">
<fo:inline color="#0082C8" font-size="8pt" font-family="serif" font-weight="normal" >Chapter Contents: </fo:inline>
<fo:inline font-size="8pt" font-family="serif" font-weight="normal" alignment-adjust="alphabetic" >Page </fo:inline>
</fo:block>
This code will simply put both two elements on the left-hand side. If I did make two in-line elements into two separate blocks, they will be on different lines! Also, adding in text-align=”right” into the second will have no effect.
Could experts offer some help? I want both elements appear on the same line and one on the very right while other on the left. Thanks!
I don’t know anything about xsl-fo, but in “normal” html/css you would give a float:left to the first element and a float:right to the second.