表位置(表在不应该关闭时下降)



这是我的代码:

<form id="form1" style="height: 800px; width:1000px" >
<table style="width: 90%; height: 193;">
    <tr>
        <td class="style4">
            <table style="width: 100%; height: 701px;">
                <tr>
                    <td style="height: 587px; width: 629px;" colspan="4" >
                        <div id="tableTree" style="height:600px;">
                            <table style="width: 150px;">
                                <div id="treeboxbox_tree" style="width:280px; height:100%; ">
                </div>
                            </table>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td >
                        <input type="button" value="Add" id="btnAdd" onclick="return someMethod()" />
                    </td>
                    <td >
            //other button
                    </td>
                    <td >
            //other button
                    </td>
                </tr>
            </table>
        </td>
        <div>
            <td>
                <table width="100%" id="smth">
                    <div style="float:left"><%Html.RenderPartial("Something"); %></div>
                </table>
            </td>
        </div>
    </tr>
</table>
</form>

在我点击按钮之前,smth不会显示。但是由于smth的高度非常大,所以具有style4的td向下移动,也就是smth的中间位置。这非常令人沮丧。如何解决?

我想你的意思是td中的垂直对齐关闭了?

<td class="style4">

将其更改为

<td class="style4" valign="top">

或者添加到style4

vertical-align: top;

不确定您正在定义哪个版本的html。。。

相关内容

最新更新