By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,799 Members | 1,376 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,799 IT Pros & Developers. It's quick & easy.

Increasing size of Drop Down Menu

P: n/a
Hi,
I've been looking all over the net for a way to increase the size of a
drop down menu without any success. Does anyone perhaps have a way to
display 11-15 items on a menu without having recourse to:
1. scroll bar.
2. configuring IE
3. decreasing the size of the font.
Here is the code I used for my Drop down Menu:
______________
<select style="background-color: #FFFFFF; width:300;" size="1"
name="menu" onchange="acceder_page()"
onBlur="document.menuform.menu.selectedIndex='0';" tabindex="1">
<option selected value="0">Menu</option>
<option value="1">1. Option number 1</option>
....
<option value="15">15. Option number 15</option>
</select>
______________

I appreciate any suggestion
Kind regards
Bils
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,
Not sure what you asked as I could see you set the size as "1" in the
code you provided. Anyway,try this

<select size=15 >
Kien

bj****@hotmail.com (Bilal) wrote in message news:<f9**************************@posting.google. com>...
Hi,
I've been looking all over the net for a way to increase the size of a
drop down menu without any success. Does anyone perhaps have a way to
display 11-15 items on a menu without having recourse to:
1. scroll bar.
2. configuring IE
3. decreasing the size of the font.
Here is the code I used for my Drop down Menu:
______________
<select style="background-color: #FFFFFF; width:300;" size="1"
name="menu" onchange="acceder_page()"
onBlur="document.menuform.menu.selectedIndex='0';" tabindex="1">
<option selected value="0">Menu</option>
<option value="1">1. Option number 1</option>
....
<option value="15">15. Option number 15</option>
</select>
______________

I appreciate any suggestion
Kind regards
Bils

Jul 23 '05 #2

P: n/a
Hi,

I tried setting the size="15" but it end up up giving me something
similar to a text area i.e its not looking any more like a drop down
menu. Size="1" seems to imply that you have 1 element visible before
clicking the little arrow in the drop down menu. I think that's why
with size="15", it looks like the text area.

Bils
Jul 23 '05 #3

P: n/a
Bilal wrote:
Hi,

I tried setting the size="15" but it end up up giving me something
similar to a text area i.e its not looking any more like a drop down
menu. Size="1" seems to imply that you have 1 element visible before
clicking the little arrow in the drop down menu. I think that's why
with size="15", it looks like the text area.

Bils


That is the defined behaviour for the <select> element. If you specify a
size="..." anything other then 1, you get a multi-line select, useful
for letting people reorder items, or usually seen like this <select
size="10" multiple="multiple">, which lets uses use a modifier key to
select multiple items from the <select>.
I'm not even sure if <select size="1" multiple="multiple"> works, and if
it doesn't I wouldn't want to be the poor user who tries to make it
work.

As for your original problem, there is simply no way to adjust the
number of items available in the drop-down menu presented by <select
size="1">. The implementation is browser and operating system dependant.
In other words, the browser and the operating system it's running on
decide how many items to display before showing a scrollbar.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.