Drop down menu

Discussion in 'HTML' started by marko, May 21, 2008.

  1. marko

    marko Guest

    Hello!

    I need some help about my code. I have:

    <html>
    <body>

    <table width="100" border=1>
    <tr><td>
    <select style="width=50px" size="1">
    <option value="0" selected> ddddd </option>
    <option value="1"> ssssss </option>
    <option value="2"> eeee </option>
    <option value="3"> rrrrrr </option>
    <option value="4"> zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz </option>
    <option value="5"> hhhhhhhhh </option>
    </select>
    </td></tr>
    </table>


    </body>
    </html>

    Problem is that I can't see all text in the drop down menu (for example:
    option value 4). It is necessary to put some scroll bar
    in the drop down menu or to expand a drop down window so I can see all the
    text inside without scroll bar.
    Any ideas how to do that?

    Thanks, Marko
     
    marko, May 21, 2008
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed "marko" <> writing in
    news:ZOVYj.12885$:

    > Hello!
    >
    > I need some help about my code. I have:


    No URL? A URL is preferred over text because there could be other
    markup in the document that effects the display, not mentioned here.

    >
    ><html>


    No DocType?

    ><body>
    >
    ><table width="100" border=1>


    Is this really tabular data? I don't think so.

    ><tr><td>
    ><select style="width=50px" size="1">


    And if the content is larger than 50px?

    > <option value="0" selected> ddddd </option>
    > <option value="1"> ssssss </option>
    > <option value="2"> eeee </option>
    > <option value="3"> rrrrrr </option>
    > <option value="4"> zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
    > </option> <option value="5"> hhhhhhhhh </option>
    ></select>
    ></td></tr>
    ></table>
    >
    >
    ></body>
    ></html>
    >
    > Problem is that I can't see all text in the drop down menu (for
    > example: option value 4). It is necessary to put some scroll bar
    > in the drop down menu or to expand a drop down window so I can see all
    > the text inside without scroll bar.
    > Any ideas how to do that?
    >


    Do not put width constraints, and you will not have this problem. The
    select element will expand as needed.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, May 21, 2008
    #2
    1. Advertising

  3. marko

    +mrcakey Guest

    "marko" <> wrote in message
    news:ZOVYj.12885$...
    > Hello!
    >
    > I need some help about my code. I have:
    >
    > <html>
    > <body>
    >
    > <table width="100" border=1>
    > <tr><td>
    > <select style="width=50px" size="1">
    > <option value="0" selected> ddddd </option>
    > <option value="1"> ssssss </option>
    > <option value="2"> eeee </option>
    > <option value="3"> rrrrrr </option>
    > <option value="4"> zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz </option>
    > <option value="5"> hhhhhhhhh </option>
    > </select>
    > </td></tr>
    > </table>
    >
    >
    > </body>
    > </html>
    >
    > Problem is that I can't see all text in the drop down menu (for example:
    > option value 4). It is necessary to put some scroll bar
    > in the drop down menu or to expand a drop down window so I can see all the
    > text inside without scroll bar.
    > Any ideas how to do that?
    >
    > Thanks, Marko


    Without seeing all the information because you haven't given us a URL - and
    before 20 people tell you what a bad idea drop down menus are - I suspect
    that your (invalid) CSS styling may be to blame. If your browser is
    forgiving enough to render "width=50px" as intended then would that not
    explain why your longer text is not being seen?

    +mrcakey
     
    +mrcakey, May 21, 2008
    #3
  4. marko

    marko Guest

    > Do not put width constraints, and you will not have this problem. The
    > select element will expand as needed.


    I have to put width constraint. Is there any other way to show scroll bar?
     
    marko, May 21, 2008
    #4
  5. marko wrote:
    >> Do not put width constraints, and you will not have this problem. The
    >> select element will expand as needed.

    >
    > I have to put width constraint. Is there any other way to show scroll bar?
    >
    >

    You *have* to? Someone got a gun to your head? If you constrain the to
    50px and the content is larger, well it's the old "10lb of sh*t in a 5lb
    bag" problem. Either remove the "width: 50px" or shorten your options.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, May 21, 2008
    #5
  6. Scripsit marko:

    > I need some help about my code.


    Delete it. That's the only useful advice for now.

    > <table width="100" border=1>
    > <tr><td>
    > <select style="width=50px" size="1">
    > <option value="0" selected> ddddd </option>


    Trying to "fix" that would be waste of time.

    Start from reading a good primer on HTML, or on web authoring in
    general.

    Then think what you wish to accomplish, and use simple and natural
    markup for it. If you want a link, use <a href>. OK? If you have several
    such links, you can use <ul> as the outer markup, mm'kay?

    Don't hesitate to come back, with a real URL and with non-forged sender
    information, if problems remain after you've done that and consumed your
    daily ratio of FAQs.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, May 21, 2008
    #6
  7. marko

    marko Guest

    Thanks everybody.

    "marko" <> wrote in message
    news:ZOVYj.12885$...
    > Hello!
    >
    > I need some help about my code. I have:
    >
    > <html>
    > <body>
    >
    > <table width="100" border=1>
    > <tr><td>
    > <select style="width=50px" size="1">
    > <option value="0" selected> ddddd </option>
    > <option value="1"> ssssss </option>
    > <option value="2"> eeee </option>
    > <option value="3"> rrrrrr </option>
    > <option value="4"> zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz </option>
    > <option value="5"> hhhhhhhhh </option>
    > </select>
    > </td></tr>
    > </table>
    >
    >
    > </body>
    > </html>
    >
    > Problem is that I can't see all text in the drop down menu (for example:
    > option value 4). It is necessary to put some scroll bar
    > in the drop down menu or to expand a drop down window so I can see all the
    > text inside without scroll bar.
    > Any ideas how to do that?
    >
    > Thanks, Marko
    >
     
    marko, May 22, 2008
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    792
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,040
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    507
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    288
  5. Replies:
    3
    Views:
    304
Loading...

Share This Page