Increasing size of Drop Down Menu

B

Bilal

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
 
K

Kien

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
 
B

Bilal

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
 
G

Grant Wagner

Bilal said:
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 <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_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-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top