Firefox fails to display scrollbar for select options
Missing select scrollbar.
I had: <select size="2" name="dates[]" multiple=multiple > - no scrollbar!
I changed it to: <select size="4" multiple name="dates[]" style="overflow:scroll"> - scrollbar back.
Which part of this fixed it I have yet to find out. I tried overflow:scroll first and that did nothing.
This requires more evidence for the big boys to come up with a permanent fix.
Regards
SteveNewcastle
Được chỉnh sửa bởi cor-el vào
Tất cả các câu trả lời (4)
Do you want a drop-down list or a listbox? I think you need the size attribute in order to generate a listbox. Then there should be a scroll bar if the number of options exceeds size. For a drop-down list, I think there might need to be 20 items before you get a scroll bar.
https://developer.mozilla.org/en/HTML/Element/select
Edit: Actually, on this demo page, adding multiple="multiple" to the select tag generates a listbox. If I add size="2" then the lower two options are hidden and the scroll arrows flip the bottom or top two options into and out of view.
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option
Edit: I think I have a better idea what you meant: when the scrollbar is smaller than size="4" there is no "thumb" on the scrollbar to move up and down. I think that's because the scrollbar is too short.
Được chỉnh sửa bởi jscher2000 - Support Volunteer vào
Thank you for your reply but the last edit I think is nearest the point. However, only Firefox seems to have this difficulty and the whole scrollbar disappears. I will try and supply a complete example in straight html. Maybe screen resolution or some other customization was not taken into account in their design.
I have done some testing with:
<select name="Select1" size="2" multiple="multiple"> <option>Rabbits</option> <option>Dogs</option> <option>Cats</option> <option>Haddock</option> <option>Shark</option> <option>Pig</option> <option>Cow</option> <option>Horse</option> </select>
and found that only IE8 is correct and consistent in this respect, Chrome tends to increase the value of size in some arbitary way whilst Firefox 14.01, unlike IE and Chrome, does not supply any scrollbar to scroll through the options. (even though the size is correct) Increasing the size to 3 puts back the scrollbar in Firefox.
Được chỉnh sửa bởi cor-el vào
I have a problem with "select" in FF 14.0.1 under ubuntu. After I added options in my select, on my page I can't change scroll options. My select is just fixed, not scrollable, though under W7 this version of FF works normally with select.