Hi All,

I am trying to create a combo box with horizontal scroller. i.e. Combo box will have a fixed width, if
any of its options have higher text, then horizontal
scroller should appear automatically.

I also tried placing a <div> around <SELECT>. But not getting how to apply styles on it.

Any suggestions will be helpful.

Thanks

Do not waste the time. The with parametr included in the <SELECT> tag controls the with of the select box itself. If you specify any other with in the <OPTION>s, and the ful names will be available on the rollet

Jan

Sunilsinha,

If I understand corrctly, then you want something that standard javascript/css cannot do. You would need to develop a custom control and serve it as an applet.

Again if I understand correctly, then I think your end users wouldn't thank you for your trouble. My visualisation of the concept makes me shudder.

Recommendation: Keep it simple.

Airshow

I am sorry to confuse with such a damned mistake: I wrote with insted of width.

This is, what I had suggested:

<select>
   <option>short</option>
   <option>very very very very long</option>
</select>
<select style="width: 80px;">
   <option style="width: 280px;">short</option>
   <option>very very very very long</option>
</select>

I knew what you meant Sysel.

Who needs that little "d" anyway?

Airshow

Little "d" for a man, the great problem for the browser :-D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.