DropDownList width problem with FireFox/Safari

I am populating a DDL with a Title (text: length 255) from my Access DB.

If I don’t define a width ,in IE. The DDL assumes a width of my webpage, which is fine because the scroll bar on the left is still viewable and I am able to scroll down to choose an item.

In Firefox, the DDL assumes the length of the longest text item, thereby not allowing the scrollbar to be viewable and it is not possible to scroll.

If I do define a width (100%), either in the control itself or using Style, IE again uses the width of the webpage for the DDL still allowing the scrollbar to be used.

Firefox, once again assumes the length of the longest text item, and there is no possibility to scroll.

I have been searching around for possible solutions to this problem but can’t find any.

For instance, I have tried to define a CSS Class with width:100% which works fine in IE but not in Firefox.

I also tried to add some BrowserCaps coding to my WebConfig, but it did not affect anything.

So what I have done is to use a Query and just present the first 100 or so characters of the title to the DDL.

If someone has an ASP.NET solution, I would like to hear about it.

The scroll bar is invisible as below:

Dropdownlist_Width_in_Firefox

 

http://forums.asp.net/t/1090990.aspx

http://www.webdeveloper.com/forum/showthread.php?t=97470

http://v2.easy-designs.net/articles/replaceSelect/

http://v2.easy-designs.net/articles/replaceSelect2/

posted @ 2010-10-22 21:14  emanlee  阅读(391)  评论(0编辑  收藏  举报