gpt4 book ai didi

html - CSS:如何在单元格表的两端放置控件

转载 作者:太空宇宙 更新时间:2023-11-04 04:56:23 27 4
gpt4 key购买 nike

我在单元格表格中有一个按钮和一个文本框。如何进行样式设置,以便两个控件都位于相反的位置。现在,按钮贴在文本框上。我希望它们位于表格单元格的两个极端。

<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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com