Select2 & BootStrap? #368

Closed
Vekyllis opened this Issue Aug 31, 2012 · 4 comments

Comments

Projects
None yet
4 participants
@Vekyllis

Hi,

I use Select2 within a Bootstrap environment. Using Select2 2.1, the width of the drop-downs are the same as that set by Bootstrap in a form - a fixed-width at 220px if using default. However, when I updated Select2 to version 3.1., the widths do not seem to inherit Bootstrap's width, so my forms contain dropdowns with differing widths depending on the widest word in the dropdown.

I don't know if this was intentional or not. One can still input the width directly into the select tag to get the desired width. But I thought I would open up an issue in case it was desired to be able to inherit the widths set by a plug-in like Bootstrap.

@ivaynberg

This comment has been minimized.

Show comment
Hide comment
@ivaynberg

ivaynberg Aug 31, 2012

Contributor

i believe you have to set the width option to 'resolve'

Contributor

ivaynberg commented Aug 31, 2012

i believe you have to set the width option to 'resolve'

@ivaynberg ivaynberg closed this Aug 31, 2012

@Vekyllis

This comment has been minimized.

Show comment
Hide comment
@Vekyllis

Vekyllis Aug 31, 2012

AHH. Thanks! That was it.

AHH. Thanks! That was it.

@d1egoaz

This comment has been minimized.

Show comment
Hide comment
@d1egoaz

d1egoaz Nov 24, 2012

For people like me who did not know where or how specify the width attribute :)

this is how is done:

    $(document).ready(function() { 
      $("#myselect").select2({ width: 'resolve' }); 
    });

d1egoaz commented Nov 24, 2012

For people like me who did not know where or how specify the width attribute :)

this is how is done:

    $(document).ready(function() { 
      $("#myselect").select2({ width: 'resolve' }); 
    });

@jeromegv jeromegv referenced this issue in thesentinelproject/threatwiki_node Dec 5, 2012

Closed

Use "select2" to improve our tags and dropdown menu #41

@macrotea

This comment has been minimized.

Show comment
Hide comment
@macrotea

macrotea Jan 29, 2013

thanks the issue

thanks the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment