Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个这样的下拉列表:
<asp:panel runat="server" groupingtext="Some Text"> <table> <tr> <td><asp:DropDownList runat="server" /></td> </tr> </table> </asp:panel>
我希望下拉列表的宽度始终填充父区域,而不管其中包含的项目的大小。我怎样才能做到这一点?
dropdownlist 以 html 形式呈现,<select>那么使用 css 怎么样?喜欢
<select>
<td><asp:DropDownList runat="server" CssClass="yourclasshere"/></td> select.yourclasshere { width:100px }