Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Bootstrap Multiselect Problem"
Bootstrap 3.3.0 Snippet by
ekctpemict
3.3.0
select
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
8.7K
 
1 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container-fluid"> <div class="row"> <div class="col-md-12 long-multiselect__outer" style="width: 150px;"> <div class="input-group btn-group"> <span class="input-group-addon"> <i>icon</i> </span> <select class="form-control long-multiselect" multiple="multiple"> <option value="cheese">Short</option> <option value="tomatoes">Extremly long option that provide a bug in Chrome</option> </select> </div> </div> <div class="col-md-12 long-multiselect__outer" style="width: 200px;"> <div class="input-group btn-group"> <span class="input-group-addon"> <i>icon</i> </span> <select class="form-control long-multiselect" multiple="multiple"> <option value="cheese">Short</option> <option value="tomatoes">Extremly long option that provide a bug in Chrome</option> </select> </div> </div> </div> </div> <script src="https://raw.githubusercontent.com/davidstutz/bootstrap-multiselect/master/dist/js/bootstrap-multiselect.js"></script> <link href="https://raw.githubusercontent.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css" rel="stylesheet">
.long-multiselect__outer { border: 1px dotted #ccc; padding: 5px; margin: 10px; } .long-multiselect__outer .multiselect-selected-text { text-align: left; padding-left: 10px; } .multiselect-container.dropdown-menu { max-width: 200%; } .multiselect-container.dropdown-menu li a label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
$('.long-multiselect').multiselect({ buttonWidth: '100%', numberDisplayed: 1 });
Related:
See More
Free Template
Coming Sssoon Page
111.1K
69
Multiselect with icons
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76