1

I have a simple dropdown menu:

<form class="feedmenu" align="center">
<select onchange="showRSS1(this.value)">
<option value="">Select an RSS-feed:</option>
<option value="ATO-HK">Asia Times</option>
<option value="HKH-HK">Hong Kong Herald</option>
<option value="Gov-HK">News.gov.hk</option>
<option value="RTHK-HK">Radio Television Hong Kong</option>
<option value="SCMP-HK">South China Morning Post</option>
<option value="STD-HK">The Standard</option>
</select>
</form>

How can I specify how large the dropdown box should be once you open it - the size="x" attribute does not do this, neither does the height="x" attribute.

  • Size should work, except in old versions of IE. –  Jun 19 '12 at 21:23
  • sorry, i'll explain more clearly: size makes the box permanently open. i want the box to be a normal dropdown box, but to dropdown longer, so there are more options on the screen when you click the button and it opens. – user1348632 Jun 19 '12 at 21:31
  • possible duplicate of [Height of an HTML select box (dropdown)](http://stackoverflow.com/questions/570642/height-of-an-html-select-box-dropdown) – Zuul Jun 19 '12 at 21:38

1 Answers1

1

Unfortunately, it doesn't look like you can change the height or number of items displayed in the dropdown without turning it into a listbox, as mentioned here.

If you really want to have control over it, then I would suggest making your own "dropdown" by creating an invisible list or table that becomes visible when you click the "dropdown". Sort of like multi-level menus, but styled to look similar to a dropdown.

Edit: Sorry, I hadn't read your comment before writing this. If you only want more options to be shown, then you can create empty ones for your dropdown. Example

Community
  • 1
  • 1
Zhihao
  • 14,758
  • 2
  • 26
  • 36