Click to See Complete Forum and Search --> : How to make a horizontal scrollbar in select box?


geqy
12-09-2002, 04:06 AM
Hi, all

I make a multiple selectbox , I hope to add horizontal scroll bar to it.

<select name="select" style="width:80" multiple size="3">
<option>aaaaaaaaaaaaaaaaaaaaaaaa</option>
<option>bbbbbbbbbbbbbbbbbbbbbbbb</option>
<option>ccccccccccccccccccccccccccccccccc</option>
<option>ddddddddddddddddddddddd</option>
</select>



I looked up in the css-sheet reference, but can not find the answer.

How can I do it with javascript?(if you know some special parameters in css-sheet, please also tell me)

Thanks

Ge

Rick Bull
12-09-2002, 05:55 AM
You should be able to do it like this:


<select name="select" style="width:80px; overflow:scroll;" multiple size="3">


Mozilla supports it, but IE and Opera don't seem to.

By the way you had some invalid CSS in there, you need a unit after the width:80 bit, if the value is anything other than 0. Any complient browser will ignore your width command otherwise.

geqy
12-09-2002, 06:11 AM
hi, Thank you for your reply.


I tried it before, but it does not work for 'select' (for <div> it is works, but also only vertical scroll )

do you have some other ideas?

Many Thanks


by the way, Netscape 4.75 does not support '80px' of 'select'