I am having a Button group control like this.
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div role="group" class="d-flex btn-group">
<button type="button" class="w-100 btn btn-outline-secondary"><i class="fas fa-print"></i></button>
<div role="group" class="dropdown btn-group">
<button aria-haspopup="true" aria-expanded="false" type="button" class="dropdown-toggle btn btn-outline-secondary"><i class="fas fa-download"></i></button>
<div aria-labelledby="" class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 32px, 0px);"><a class="w-100 dropdown-item" role="button" href="#">Dropdown link</a><a class="w-100 dropdown-item" role="button" href="#">Dropdown link</a></div>
</div>
<button type="button" class="w-100 btn btn-outline-secondary"><i class="fas fa-th"></i></button><button title="Clear" type="button" class="w-100 btn btn-outline-secondary"><i class="fas fa-eraser"></i></button>
</div>
The nested button group is not taking the available width as other buttons are taking.
I tried giving w-100
as well but no help.
3
Answers
Please check below code, its may help you
I ran into this problem as well. I was able to fix it by adding the
flex-fill
class to the div of the nested button group.