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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi All How can I make a listbox

Status
Not open for further replies.

janakrajani

Programmer
Dec 5, 2001
9
US
Hi All

How can I make a listbox stop automatically expanding
when the text becomes too large ??? Is there any way, I can specify the column width or something else ?

Help appreciated.

 
Try this:

<div style=&quot;width:160px&quot;>
<select size=&quot;1&quot; width=&quot;160px&quot;>
<option></option>
</select>
</div>


This will make your list box be the same width all the time, in both IE and Netscape. Just make sure that the user is going to be able to read all of your values :)

 
Thanks for the solution.

This is already been done by me. But the text that is entered in between <option>...</option> tag is not viewed after 160px. There is no scroll bar also. Meaning, the text is cut after 160px.

Any solution ?
 
I think your only solution is to make it wider. If you are specifying a width, then the text in your <option> tags will be cut off at that width. I don't know if there is a way to make a horizontal scroll bar for a select box.

Sorry I can't be of more help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top