我想在第二个单元格中将文本对齐到底部。 第一个单元格延伸到2行,因为宽度不足而且没问题 但是第二个单元格中的文本只有一行,显示在单元格的顶部。 我怎样才能将它与底部对齐?
我尝试了vertical-align =“bottom”text-align =“bottom”text-align =“end”on 行,单元格和块级别..它们中的任何一个都有效吗?!?
<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>
答案 0 :(得分:36)
在表格单元格上使用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>
答案 1 :(得分:0)
以防有人发现此问题:
如果上面有图像和文字,则不希望在之后但之前对齐:
SELECT
COUNT(a_id),
(
SELECT COUNT(*) FROM attendance
WHERE state = 'present'
AND `dater` BETWEEN '$a' AND '$b'
) AS Count,
stud_id
FROM attendance
WHERE
stud_id =(SELECT id FROM users WHERE NAME = '$stud')