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

drop down list length

Status
Not open for further replies.

daph

Programmer
Jun 9, 2000
65
CA
Hi!

I just wanted to know if there was a way to specify the length of a drop down list, even though the content is longer than the wanted length.

Thank you! :)

-daph
 
Try adding length="n" to the select tag.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Netscape 4.x Browsers do not apply width values to SELECT tags via CSS. The proprietary WIDTH attribute must be used in the SELECT tag. Netscape 4.x and Microsoft 4.x browsers respond appropriately to the inline STYLE attribute shown below.

<FORM NAME=&quot;form1&quot; >
<SELECT NAME=test STYLE=&quot;width: 300px;&quot; WIDTH=&quot;300&quot;>
<OPTION VALUE=&quot;1&quot;>This is the item for Number one</OPTION>
</SELECT>
</FORM>

However, this only works in NS4.X if you want to make the select menu bigger. IE & NS6 are the only ones you can make the select menu smaller using STYLE=&quot;width: 50px&quot;
- tleish
 
Interesting point here: I thought when daph said &quot;length&quot; it was in reference to the number of items that show when you expand the list by clicking on the arrow. It didn't occur to me that it might mean the WIDTH of the box itself. My answer should work for the former, tleish answered the latter.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Is there a Maximum number of items you can put into a list box ?
sjf
 
I suspect that there is a limit, but I've never hit it. I've seen drop downs with well over 50 items with no trouble. If they get much longer than that, they become cumbersome for the user. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top