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!

Can you set the horizontal length of a list box???

Status
Not open for further replies.

FRANDAZZO

Programmer
Nov 29, 2000
60
US
Hi,

I want to know if it is possiable to size the horizontal
length of a list box. This is because if my list box does not get populated the if shrinks. And I want the size to be consistant. Can you help


Thanks....
 
you might be able to use a style:

<select style=&quot;width:100px&quot;> jared@aauser.com
 
If that doesn't work, you will have to add w wholoe bunch of nbsp's on the end of one of the entries until the right number of characters is reached. You will need to count them first, then add depending on how many.

-Ben &quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
jared's solution won't work if you have a loooong string in you options texts : just as tables, select boxes adapt to the longest string ...
 
Iza, not in NS4-, though I'm not sure if my solutioin would work in NS4- anyway. But, even in IE, you may want to set it to the alrgest possible size, that you don't have to worry about size at all. jared@aauser.com
 
a solution i found once was to truncate all option fields to the same length
but it's not realllly elegant ;-) !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top