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!

Drop-down list sizing for IE

Status
Not open for further replies.

Cineno

Programmer
Jul 24, 2006
142
US
I have a site with many drop-down lists. Some of the text in the list can be pretty long. I have the width of the lists set in a style sheet so that the format of the page is the same no matter what's in the list.

In Firefox, when the user clicks the drop-down it shows all the text, no problem.

In IE, the width of the drop-down stays as the css set it, and therefore only shows part of the text.

Is there anything I can do to make the drop-downs behave in IE as they do in Firefox? Anyone have any ideas?

Any help is appreciated! Thanks.
 
Don't rely on styling form elements. There are many references that back this statement up.

If you cannot fit your text in a select element whose width you don't style, then look for another means of displaying it (or shrink the font size).

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I have had the same issue, it's a browser thing and there isn't much you can do about it. The only workaround is doing what Cineno mentioned, which is something like this:

Code:
<select name="event" id="event" style="width:450px">
<option value="0" style="font-size:9px">Item 1 </option
...
...
</select>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top