2011-07-29 9 views
16

2番目のセルのテキストを下部に揃えたいとします。 最初のセルは不十分な幅のため2行に伸びていてOKです しかし、2番目のセルのテキストは1行だけで、セルの上部に表示されます。 どうすれば底に合わせることができますか?テーブルセルのテキストの垂直方向の整列

の行、セル、ブロックのレベルで、縦書きの「下」のテキスト・アラインメント=「下」のテキスト・アライメント=「終わり」を試しました。表のセルに

<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> 

答えて

32

使用display-align="after":誰かがこの問題を発見した

<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> 
+0

ありがとうございました!それはうまくいきました.. – AbsoleteMe

+1

の真ん中にテキストを縦に揃えたい人向けのヒント - Apache FOPでは動作しません:http://xmlgraphics.apache.org/fop/compliance.html# fo-property-vertical-align – rbaleksandar

+0

私の場合、display-align属性は全く機能しません。 – masche

0

念のために:あなたは上の画像とテキストを持っている場合は

後に整列する必要はありませんが、前:

<fo:table-cell display-align="before"> 
<!-- Your image & text separated in blocks --> 
<fo:table-cell> 
関連する問題