set the width of select2 input (through Angular-ui directive)

前端 未结 12 1767
名媛妹妹
名媛妹妹 2020-12-22 20:14

I have problem making this plunkr (select2 + angulat-ui) work.

http://plnkr.co/edit/NkdWUO?p=preview

In local setup, I get the select2 work, but I cannot set

12条回答
  •  無奈伤痛
    2020-12-22 21:02

    Setting width to 'resolve' didn't work for me. Instead, i added "width:100%" to my select, and modified the css like this :

    .select2-offscreen {position: fixed !important;}

    This was the only solution that worked for me (my version is 2.2.1) Your select will take all the available place, it is better than using

    class="input-medium"

    from bootstrap, because the select is always staying in the container, even after resizing the window (responsive)

提交回复
热议问题