size of Dropdownlist

Hey guys this is more of visual issue. I have a dependent dropdown list for city that populates when a state is selected. However, before the user makes a selection the dependent dropdownlist looks really ugly. Its not of uniform horizontal size as other elements of my form.

Does anybody have an idea how to fix this without compromising on the ajax funtionality.

Try, array(‘size’=>Sizeofyourpreference) into your dropdownlist code.

If don’t work, paste the code here for further analysis.

You could apply a class to the drop down list and assign a specific width to it in your css. Something like:




select.medium { width: 200px; }



Of course, the width could be specified in any css units. Bear in mind that this may cause the content in the select box to be visibly truncated.