力DIV在工作台TD内达到最高高度

问题描述

| 我懂了:
<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>
我希望本文能很好地解释我的问题:)     

解决方法

        首先,在2011年使用表格布局是一个坏主意,更不用说混合表格和div布局了! 我觉得在仅div的布局中执行此操作要比此简单得多。     

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...