我在单元格表格中有一个按钮和一个文本框。如何进行样式设置,以便两个控件都位于相反的位置。现在,按钮贴在文本框上。我希望它们位于表格单元格的两个极端。
<td style= "width:300px">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</td>
最佳答案
试试这个:
<td style= "width:300px">
<asp:TextBox ID="TextBox1" runat="server" style="float:left;"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" style="float:right;"width:100px; />
</td>
关于html - CSS:如何在单元格表的两端放置控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12372969/