84
rated 0 times
[
89]
[
5]
/ answers: 1 / hits: 100145
/ 11 Years ago, tue, september 3, 2013, 12:00:00
How can I set the width of a dropdown triggering button in bootstrap 3.0 to be equal to the width of the dropdown list? Similar to what is achieved when using bootstrap-select (http://silviomoreto.github.io/bootstrap-select/). I have tried to wrap the whole list in a div with a col-* class, but that doesn't seem to work:
<div class=row>
<div class=col-xs-4 col-md-4>
<div class=dropdown>
<button type=button class=btn btn-danger dropdown-toggle data-toggle=dropdown>Button</button>
<ul class=dropdown-menu role=menu>
<li><a href=#>Action</a></li>
<li><a href=#>Action</a></li>
<li><a href=#>Action</a></li>
</ul>
</div>
</div>
Thus, I would like: button width = dropdown menu list = col-* width.
More From » html