Vertical alignment of text in a table cell

AbsoleteMe picture AbsoleteMe · Jul 29, 2011 · Viewed 36.7k times · Source

I would like to align the text to bottom in the second cell. The first cell extends to 2 lines, because of insufficent width and that's OK But the text in the second cell is only one line and shows up at the top of the cell. How can I align it to bottom?

I tried vertical-align="bottom" text-align="bottom" text-align="end" on row , cell and block levels.. Any of them worked?!?

<fo:table font="normal 10 pt Arial, sans-serif" width="100%">
<fo:table-column column-width="40mm"/>
<fo:table-column column-width="130mm"/>
<fo:table-body>
<fo:table-row>
  <fo:table-cell padding-before="3pt" padding-after="3pt">
     <fo:block font-weight="bold">Pricing Rate in % p.a. / "Pensionssatz in % p.a.":</fo:block>
  </fo:table-cell>
  <fo:table-cell padding-before="3pt" padding-after="3pt">
    <fo:block> 
     **This text I want to be aligned to bottom (in the second line)** 
     </fo:block> 
  </fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>

Answer

mzjn picture mzjn · Jul 29, 2011

Use display-align="after" on the table cell:

<fo:table-cell padding-before="3pt" padding-after="3pt" display-align="after">
 <fo:block>
  **This text I want to be aligned to bottom (in the second line)**
 </fo:block> 
</fo:table-cell>