views:

8643

answers:

2

Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box.

The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either.

+15  A: 

confirmed.

The part that drops down is set to either:

(a) the height needed to show all entries, or
(b) the height needed to show (x) entries (with scrollbars to see remaining)
     (20 in Firefox & Chrome, 30 in IE6,7,8, 16 for Opera, 22 for Safari,
      11 in IE5.0,5.5)
(c) In IE, if there are no options, a stupidly high list
   of 11 blanks entries.
scunliffe
A: 

i have been working on a dropdown replacement jquery plugin to combat this problem. As of this post, it is almost indistinguishable from a native dropdown in terms of look and functionality.

here is a demo: http://programmingdrunk.com/current-projects/dropdownReplacement/

here is the project page which has the latest stable version:

http://plugins.jquery.com/project/dropdownreplacement

mkoryak
interesting idea - I certainly like the ability to "skin" the fake select list (I find many default from the "native" OS theme and thus look "odd"), and the ability to control the content in the list I find handy (since IE provides very little styling options for option elements)
scunliffe