Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Width of chosen #453

Closed
nazar-pc opened this Issue · 6 comments

7 participants

@nazar-pc

Width of wrapper with class "chzn-container chzn-container-single chzn-container-active" is smaller, than it is necessary, and not all letters title is displayed, but when I delete calculated width in wrapper in "style" property - it works well. The question is: why this width is calculated, maybe it is better to leave automatic width?

@sbarre

I'd second this question. Likewise I am having to explicitly set a width CSS on all my selects because you inherit the calculated outerWidth() property but this makes the Chosen select smaller than it should be and it truncates the text.

@marcelow

I am also experiencing this issue. I have tried to reset the width using javascript, but the best answer so far is to manually set the width in all selects.

@raulfernandez

mmm... the width of chosen must be calculated taking into account the expandable icon (.chzn-container-single .chzn-single div b)

@daveheitzman

when the target select element has no width property set, the chozn ul element has a width of 0 making the chozn dropdown useless. when a style="width:150px" is set on the select element it works fine.

@balakrishna-gajam

Hi..try this code...

$('select').chosen();
$('.chzn-single').css('width','290px');
$('.chzn-drop').css('width','298px');
$('.chzn-search input').css('width','263px');

@pfiller
Owner

As of c3d906c, chosen does only one width calculation and that's on the parent container. Everything else inside of that div is calculated using CSS. I think this issue can be closed.

@pfiller pfiller closed this
This was referenced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.