Chosen: Width 100% on multiple select will make it really small

Created on 6 Sep 2014  路  2Comments  路  Source: harvesthq/chosen

Hi,
I have a little strange problem with an multiple select field.
If i set the chosen option width to 100% the field gets really small.

This is a screenshot without the option
bildschirmfoto 2014-09-06 um 01 46 36
and this is with activate option
bildschirmfoto 2014-09-06 um 01 46 59

Does anybody know because it gets smaller with the option?
On both situation the content of the dropdown will be cut off. This width could also not be the reason of that.

All other chosen elements will get the right width with this option only the multiple select field not.

BR

Most helpful comment

Are you specifying a width of 100% on the original select field or when you call Chosen? The proper way to do it is to include it when you call Chosen:

$("select").chosen({ width: '100%' });

If you're using it that way and still seeing a bug, please provide a link that shows the problem happening (ideally in the form of a fiddle) so we can help you debug. Thanks.

All 2 comments

i have the same problem,

I resolved it creating a div with the width that you want. Insde the div i create the control chosen and I establis the style width: inherit!important; and it works

Are you specifying a width of 100% on the original select field or when you call Chosen? The proper way to do it is to include it when you call Chosen:

$("select").chosen({ width: '100%' });

If you're using it that way and still seeing a bug, please provide a link that shows the problem happening (ideally in the form of a fiddle) so we can help you debug. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ali1360 picture ali1360  路  5Comments

engintekin picture engintekin  路  8Comments

zerocrates picture zerocrates  路  7Comments

vpode picture vpode  路  5Comments

asvetlenko picture asvetlenko  路  3Comments