View Full Version : forcing dropdownlist widths
12-14-2006, 07:41 PM
is there any way i can force the width of the dropdownlist so that it doesnt make the drop down field as long as the longest option on the list....this is tottally messing up my layout.
Any ideas? thanks
12-14-2006, 07:59 PM
<asp:DropDownList ID="MyDDL" runat="server" Width="100px" ...
12-14-2006, 08:07 PM
this doesnt workin in gecko browsers like FF and Opera. Is there another method?
12-14-2006, 09:24 PM
Do you mean forcing the width of the "dropdownlist" or the "select box" ?
Width="100px" will force the width of the dropdownlist on IE, FF and OP
12-14-2006, 09:58 PM
<ASP:DropDownList Id="someListDropDownList" Runat="server" Width="150px" />
In FF and Opera it's still showing the list to be as wide as the longest option on that drop down list. In IE it works just fine.
12-14-2006, 10:02 PM
Have you tried:
<asp:DropDownList Id="someListDropDownList" runat="server" style="width: 150px;" />
12-14-2006, 10:40 PM
thanks Premium, that did the trick.
12-15-2006, 12:34 AM
Ok I understand, that's because you are using framework 1.1 and I am using framework 2.0
This bug has been fix on framework 2.0
Using Width="100px" will work on FF and Opera with framework 2.0
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.