[WEB4LIB] drop-down menu query

Thomas Dowling tdowling at ohiolink.edu
Thu Jul 11 08:59:47 EDT 2002


At 07:55 AM 7/11/2002, Herman, Lucrezia wrote:
>Hi, all-
>
>Our home page (http://www.ntu.ac.uk/lis/) includes 2 drop-down menus.  The
>bottom box (Subject Portals) contains 16 entries which we would like to be
>visible without the need for scrolling once the down arrow has been clicked.
>Is this possible?...

Yes.  Use a browser that displays all 16 entries without scrolling.  On my 
system, neither Opera nor Mozilla use a scroll bar.


>...Any code tweaks gratefully received!

[May I recommend that you start by tweaking the code so that it works on 
browsers with Javascript turned off?  As it is, some non-negligible 
percentage of your users cannot use these menus at all.]

Of course, there is the select element's "size" attribute, but that would 
keep the menu always open to the required size instead of acting as a 
drop-down.  I am not aware of any code--certainly not HTML code, I'll let 
Javascript wizards speak for themselves--that affects the length of the 
<select> element only when it is dropped down.  If there were such code, it 
would very likely not work across multiple browsers and platforms: most 
browsers rely on the operating system's native widgets to create form 
inputs, making them less susceptible to styling hints in the web page.


Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu




More information about the Web4lib mailing list