Drop down menu

M

marko

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
 
A

Adrienne Boswell

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.

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.
 
M

+mrcakey

marko said:
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
 
M

marko

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?
 
J

Jonathan N. Little

marko said:
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.
 
J

Jukka K. Korpela

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.
 

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
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top