我有一个这样的下拉列表:
<asp:panel runat="server" groupingtext="Some Text">
<table>
<tr>
<td><asp:DropDownList runat="server" /></td>
</tr>
</table>
</asp:panel>
我希望下拉列表的宽度始终填满父项的区域,而不管其中包含的元素的大小。我该怎么做?
最佳答案
下拉列表呈现为 <select>
在 html 中
那么如何使用CSS?
喜欢
<td><asp:DropDownList runat="server" CssClass="yourclasshere"/></td>
select.yourclasshere { width:100px }
关于asp.net - asp :DropDownList width, 填充父级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16568963/