Increasing size of Drop Down Menu

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bilal

    Increasing size of Drop Down Menu

    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="backgrou nd-color: #FFFFFF; width:300;" size="1"
    name="menu" onchange="acced er_page()"
    onBlur="documen t.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
  • Kien

    #2
    Re: Increasing size of Drop Down Menu

    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

    bjeewa@hotmail. com (Bilal) wrote in message news:<f9882c89. 0405171047.3c09 cb03@posting.go ogle.com>...[color=blue]
    > 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="backgrou nd-color: #FFFFFF; width:300;" size="1"
    > name="menu" onchange="acced er_page()"
    > onBlur="documen t.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[/color]

    Comment

    • Bilal

      #3
      Re: Increasing size of Drop Down Menu

      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

      Comment

      • Grant Wagner

        #4
        Re: Increasing size of Drop Down Menu

        Bilal wrote:
        [color=blue]
        > 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[/color]

        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="multi ple">, which lets uses use a modifier key to
        select multiple items from the <select>.
        I'm not even sure if <select size="1" multiple="multi ple"> 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 <gwagner@agrico reunited.com>

        * Client-side Javascript and Netscape 4 DOM Reference available at:
        *


        * Internet Explorer DOM Reference available at:
        *
        Learn with interactive lessons and technical documentation, earn professional development hours and certifications, and connect with the community.


        * 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


        Comment

        Working...