1

I Have a DropDownList which is being populated from database on my asp.net webform. The items of the DropDownList expand according to the length of the items in Chrome and Mozilla. BUT in IE the items of the DropDownList get cut off.

I tried ...

var el;

$("select")
  .each(function() {
    el = $(this);
    el.data("origWidth", el.outerWidth()) // IE 8 can haz padding
  })
  .mouseenter(function(){
    $(this).css("width", "auto");
  })
  .bind("blur change", function(){
    el = $(this);
    el.css("width", el.data("origWidth"));
  });

Which I found http://css-tricks.com/select-cuts-off-options-in-ie-fix/

but it doesnt seem to be working. Help!

SamuraiJack
  • 5,131
  • 15
  • 89
  • 195
  • possible duplicate of [Select dropdown with fixed width cutting off content in IE](http://stackoverflow.com/questions/682764/select-dropdown-with-fixed-width-cutting-off-content-in-ie) – Shashank Chaturvedi Mar 06 '14 at 09:48
  • this can help. http://stackoverflow.com/questions/73960/dropdownlist-width-in-ie?lq=1 – Ashwini Verma Mar 06 '14 at 09:57
  • I have already tried all those.. none of them seems to be working. :( – SamuraiJack Mar 06 '14 at 10:06
  • I tried http://www.dougboude.com/blog/1/2008/05/Viewing-Option-Text-in-IE7-thats-Wider-than-the-Select-List.cfm And it seems to be working fine .. can anyone tell me is there any problem with this approach? – SamuraiJack Mar 06 '14 at 10:22

0 Answers0