Css 表TD内的强制DIV全高

Css 表TD内的强制DIV全高,css,html,html-table,Css,Html,Html Table,我明白了: <style> .topdiv { vertical-align:top } .bottomdiv { vertical-align:bottom } </style> <table border="1" cellspacing="0" cellpadding="0"> <tr> <td> content<br/> cont

我明白了:

<style>
.topdiv {
    vertical-align:top
}
.bottomdiv {
    vertical-align:bottom
}
</style>

<table border="1" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            content<br/>
            content<br/>
            content<br/>
            content<br/>
            This cell holds content that is higher than the right side<br/>
            content<br/>
            content<br/>
            content<br/>
            content
        </td>
        <td>
            <div class="containerdiv">
                <div class="topdiv">
                    I want this DIV at the top of the cell
                </div>
                <div class="centerdiv">
                    I want this DIV in the middle of the cell
                </div>
                <div class="bottomdiv">
                    I want this DIV at the bottom of the cell
                </div>
            </div>
        </td>
    </tr>
</table>

托普迪夫先生{
垂直对齐:顶部
}
.bottomdiv{
垂直对齐:底部对齐
}
内容
内容
内容
内容
此单元格包含高于右侧的内容
内容
内容
内容
所容纳之物 我想把这个DIV放在牢房的顶部 我希望这个div在细胞的中央 我想把这张照片放在牢房的底部

我希望本文能很好地解释我的问题:)

首先,在2011年使用表格布局是个坏主意,更不用说混合使用表格和div布局了


我觉得在一个只有div的布局中执行此操作要比在这个布局中简单得多。

我已经为您和其他人准备好了。谁说这是一个布局?它也可以是一个表示数据的表。midas:“高于右侧”“顶部”“中心”“底部”,会敲响任何铃声?也可以用于结束HTML电子邮件,因此可以使用表结构来证明它的合理性。