给定以下示例:http: //jsfiddle.net/upsidown/z4m7r/
HTML:
<table class="main-table" cellspacing="20">
<tr>
<td style="height:100%;"><table class="sub-table"><tr><td>Some text</td></tr><tr><td class="bottom-align">Some bottom aligned element</td></tr></table></td>
<td>Some very long text. Some very long text. Some very long text. Some very long text. Some very long text. Some very long text. </td>
<td>Some other text</td>
</tr>
</table>
CSS:
.main-table {
width:300px;
vertical-align: top;
}
.main-table td {
vertical-align: top;
}
.sub-table {
height:100%;
}
td {
border:2px solid black;
}
td.bottom-align {
vertical-align: bottom;
background:yellow;
}
黄色单元格文本应在底部垂直对齐。这适用于 Firefox,但不适用于 Safari / Chrome (webkit) 浏览器。
知道如何实现吗?提前致谢。