This is not an ideal solution, but it seems to work.
In the select tag, specify the following attributes, where 'n' is the number of lines of the drop-down list that will be visible.
<select size="1" position="absolute" onclick="size=(size!=1)?n:1;" ...>
There are three problems with this solution. 1) Fast flash of all items displayed during the first mouse click. 2) The position is set to “absolute”. 3) Even if the number of elements "n" is less than in "n", the drop-down field will still have the size "n".
Chi Row Dec 19 '13 at 21:43 2013-12-19 21:43
source share