select2 - Setting different width to input and dropdown

The property you used is not for controlling the dropdown width. You can use the dropdownCssClass property.

Here's a demo in jsFiddle.

JavaScript:

$(document).ready(function() { 
    $("#e1").select2({dropdownCssClass : 'bigdrop'}); 
});

CSS:

.bigdrop {
    width: 600px !important;
}

Please note that for more recent versions there is now a better solution! See Dave Amphlett's answer


$("#e1").select2({ width: '100%' });      

Try this. This will set the width of container to 100%


Select2 includes 'dropdownAutoWidth' parameter which uses javascript to attempt to be wide enough for the dropdown contents.

$('#whatever').select2({dropdownAutoWidth : true});

This at least works with Select2 3.4.3 - I don't know how much earlier it was introduced.