admin管理员组

文章数量:1405393

Essentially the length of the HTML Select drop down is exceeding the screen on notebooks, I've checked and different browsers allow different amounts of options to be displayed before it turns it into a scrollbox. Is there any way of putting in a browser css hack or javascript action to stop it at 3 options? Failing that is there any way to limit the height of the drop down for the same effect?

I've googled up on this but with no such luck, no one seems to have had a problem with notebooks before. I know it's possible as on the Lloyds TSB personal login screen there is a select element which limits to about 3/4 options. As I say I don't mind using JS or even browser specific solutions as I've developed a notebook friendly way of doing it which is less intuitive and clunky looking but can be used as a default.

Any help would be greatly appreciated.

Rupert S.

Essentially the length of the HTML Select drop down is exceeding the screen on notebooks, I've checked and different browsers allow different amounts of options to be displayed before it turns it into a scrollbox. Is there any way of putting in a browser css hack or javascript action to stop it at 3 options? Failing that is there any way to limit the height of the drop down for the same effect?

I've googled up on this but with no such luck, no one seems to have had a problem with notebooks before. I know it's possible as on the Lloyds TSB personal login screen there is a select element which limits to about 3/4 options. As I say I don't mind using JS or even browser specific solutions as I've developed a notebook friendly way of doing it which is less intuitive and clunky looking but can be used as a default.

Any help would be greatly appreciated.

Rupert S.

Share Improve this question edited Apr 29, 2012 at 19:46 Abhranil Das 5,9066 gold badges36 silver badges45 bronze badges asked Apr 4, 2011 at 12:19 Maj. FailMaj. Fail 671 silver badge7 bronze badges 1
  • notebook tag removed as part of the 2012 cleanup. – Abhranil Das Commented Apr 29, 2012 at 19:46
Add a ment  | 

1 Answer 1

Reset to default 7

Sadly, you can't change the item's that the dropdownlist displays, it is decided by the browser, with the size option it will loose its 'dropdownlist' form, and turn more into a list.

You could try finding some Jquery dropdown list, they are usually editable to whatever you want.

本文标签: