Forum Moderators: open

Message Too Old, No Replies

control height of drop down form

control height and force scroll

         

smokeybarnable

7:00 pm on Aug 17, 2008 (gmt 0)

10+ Year Member



I have a drop down menu that contains any number between 1 and 100. It depends on how many products I have in stock. The customer can adjust quantity this way easily. It works fine but I was wondering if there is any way to control the height of the drop down. It looks odd if I have 100 in stock and the drop down menu pops all the way to the edge of the browser window. For example, could I only set it to display 1- 25 in the drop down and force the user to scroll to select the higher numbers? The reason I want to do this is for aesthetics and usability. I notice a long drop down box may cause problems at lower resolutions. Could I use css for this?

smokeybarnable

7:18 pm on Aug 17, 2008 (gmt 0)

10+ Year Member



I notice IE default drop down is 30 options while firefox is 20. It isn't a big deal but was just wondering if there was a simple way to control the height.

csuguy

10:16 pm on Aug 17, 2008 (gmt 0)

10+ Year Member



Use the HTML attribute "SIZE". For example:


<select name="test" [B]size="#"[/B]>...

Replace # with how many you want to display before requiring the user to scroll.

Ryan