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

Problem with select and lines

Status
Not open for further replies.

fayna

Programmer
Jan 14, 2002
35
ES
Hi,
The text of the elements of my select is too large and I'd like to divide it in two lines. I've tried to insert <br> tag but it has no effect.
How can I resolve it?

Thanks
Fayna
 
You can write shorter text, that is the only solution I'm afraid.
 
Vragabond is right - shorter text, smaller font-size or wider dropdowns are your only options if you want to continue using <select> dropdowns.

Maybe CSS dropdowns would be appropriate instead, they are very easy to modify - but I'm afraid I don't know the context of your dropdown so I can't really comment.

Do you have a link you could post? What does the dropdown do on your page?

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
Not much you can do about the double line, unless you put a blank option between them, as for the font-size try setting it in a in-line style.

ie.

Code:
<SELECT NAME="textsize" style="background:red;color:white;font-size:16px;word-spacing:7px">
<OPTION VALUE="s">Small Font
<OPTION VALUE="m">Medium Font
<OPTION VALUE="l">Large Font
</SELECT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top