这里是我的代码垂直对齐顶部的CSS
<div style="margin:0;padding:0;vertical-align:text-top; border:1px solid red;float:right;">
<span>Key:</span>
<asp:TextBox ID="tbKey" MaxLength="16" runat="server" ></asp:TextBox>
<asp:ImageButton ID="btnRefresh" runat="server" imageUrl="_img/btn_submit.gif" Height="22" Width="52" />
</div>
我想所有的三个要素简单地在顶部排队。这是可行的吗?
编辑: 的源代码(渲染)是
<div style="margin:0;padding:0;vertical-align:text-top; border:1px solid red;float:right;">
<span>Key:</span>
<input name="tbKey" type="text" maxlength="16" id="tbKey" />
<input type="image" name="btnRefresh" id="btnRefresh" src="_img/btn_submit.gif" style="height:22px;width:52px;border-width:0px;border-width:1px;" />
</div>
这就是你的.net代码。向我们展示呈现的HTML/CSS。 – 2011-02-22 21:09:12
刚编辑的问题,见上面的 – sarsnake 2011-02-22 21:45:51