Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2-line option value in drop down menu

Status
Not open for further replies.

susan17

Programmer
Nov 6, 2001
12
0
0
SG
Hi!
I have a drop down list that needs to have a fixed with,e.g.50.

However, the value of the options maybe more than 50 characters.

Please advise how to overcome this problem.

I've tried putting a <br /> in the option value, hoping that the option will consist of 2 lines, however it's not working.
<option selected=&quot;yes&quot; value=&quot;1&quot;>aaaaa<br />bbbbb</option>

Any suggestions? please help....

With Regards,
Susan
 
I think yer asking it to do something it cant.
Maybe try a smaller font size or a narrow font type to squeeze it in there. Otherwise you could do:

<option selected=&quot;yes&quot; value=&quot;1&quot;>aaaaa</option>
<option selected=&quot;yes&quot; value=&quot;1&quot;>bbbbb</option>

sorry if not much help.

É **new site coming soon**
 
I'm sure that you can't create an option that consists of 2 lines.

You may try to apply style to your drop down box, like this:

<option style=&quot;font-size: 8pt&quot; value=&quot;...&quot;> . . .</option>

This will make the font size smaller so it will take less space on a page, but it's not an ideal solution.
Applying [tt]width:50px [/tt] to a style will not solve the problem.

You have to think how to aviod long values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top