Width of drop down in a combo box

is there a way to increase the width of only the drop down in a combo box???

using javascript and without using active widgets…

:d:

What? I don’t think I understand?

Can you not just use the css property [font=monospace]width[/font]?

nah… he wants the selection box to be one size then the sub items another, i believe.

See when you create a combo box and set the width say 80 px, then you have items in dropdown that exceed the given width and most of the text is hidden…

<select name=“sel1” style=“width:80px;”>
<option>ABCDEF</option>
<option>uiysudygfksfg876976sd</option>
<option>uiysudygfksfg876976sd</option>
<option>uiysudygfksfg876976sd</option>
<option>uiysudygfksfg876976sd</option>
</select>

now what i want to know is, is there anyway where i can increase the width of only the dropdown without altering the width of the combo box.

Try changing the width of all the options?

Worth a shot…

If I remember right that will work in Firefox but not in IE.

The only thing I could thik of is if you went with something like the auto suggest feature (or whatever you want to call it) at Google Suggest:

Start typing in the box and you’ll get some suggestions. Something like that using Javascript to output your options from a select list is possible, but it’s probably more work that it’s worth.

I’m not sure how long your options will be but could you shirnk the text a little and still have it fit in an 80px wide select list?

mmm no i cannot decrease the text… its for a web application and the client has really long options tht cannot be shortened… ya it works fine in firefox but in ie it does not :frowning:

Simulate a combo box by creating a dropdown menu.
You can’t alter the width of the options only, the combo is a control. Browsers don’t know how to handle in depth customization of controls.

I think that’s not possible changing the width of drop-down layer without changing the width of combo-box as a whole. I have encountered such thing.

What ditto said can be employed if the items in your combo-box aren’t too many.

it works perfectly fine in firefox but not in IE… this browser compatibility thing is driving me nuts …