How to get button groups that span the full width of a parent in Bootstrap?

Correct solution for Bootstrap 4 and Bootstrap 5 (from Bootstrap 4 migration documentation):

Removed .btn-group-justified. As a replacement you can use <div class="btn-group d-flex" role="group"></div> as a wrapper around elements with .w-100.

Example:

<div class="btn-group d-flex" role="group" aria-label="...">
  <button type="button" class="btn btn-default w-100">Left</button>
  <button type="button" class="btn btn-default w-100">Middle</button>
  <button type="button" class="btn btn-default w-100">Right</button>
</div>

Source: https://getbootstrap.com/docs/4.0/migration/#button-group

Edit: verified solution with Bootstrap 5

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)