Click here to Skip to main content
15,884,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a ASP:DropDownList on my page. And the control width is normal that I've set. But when clicking on list, the Container width expends according to max length of all the items. So how to manage the container width?&
Posted

1 solution

@manudhiman6: Its the behaviour of the control to adopt max length, you have to adjust width via CSS. You can use the css, style="width: 150px;" , this will keep your control's width consistent.
 
Share this answer
 
Comments
Manudhiman 1-Aug-14 6:39am    
Already tried this... Before using style it expends on right side.. after using style it expands on left side.

<asp:DropDownList ID="ls_grp" Width="115px" runat="server" Style="margin-left:30px; width:115px;">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900