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

Length for combobox

Status
Not open for further replies.

Serban

Programmer
Sep 25, 2001
36
RO
I have a combobox with very long options.
First I want to display the control just on 15 characters and just when the user click the combo to display the full options.
How can I do that?

Thanks
 
Not sure...it's the nature of the HTML <SELECT> element to automatically stretch to the width of the maximum <OPTION> element.
 
You could try using a STYLE tag. I know for a fact it will make a SELECT box wider than the widest OPTION, but I don't know if it will do what you want it to do.
Code:
<SELECT NAME=&quot;...&quot; STYLE=&quot;width:250px;&quot;>
   <OPTION>
Something
Code:
</OPTION>
</SELECT>
Kevin
slanek@ssd.fsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top