I'm struggling with my button group layout that should display 3 buttons in a row. Each button is a regular bootstrap button with an icon image. However, when I try to use spans within the button's grid, the icon image gets displaced.
This is the HTML:
<div class="container-fluid">
<div class="row">
<div class="col-md-6>
<div class="row">
<div class="btn-group order-type-buttons col-12"
role="group" aria-label="First group">
<button type="button" class="btn order-type-btn-blue col-4"><span class="col-8 button-text">Online Pick Up</span><span class="col-4 span-img"><img class="img-fluid" src="images/icon%20files/online-pickup-icon.png" alt=""></span></button>
<button type="button" role="button" class="btn order-type-btn-blue col-4"><span class="col-8 button-text">Online Take out</span><span class="col-4 span-img"><img class="img-fluid" src="images/icon%20files/online-take-out-icon.png" alt=""></span></button>
<button type="button" class="btn order-type-btn-blue col-4"><span class="col-8 button-text">Pick up</span><span class="col-4 span-img"><img class="img-fluid" src="images/icon%20files/pick-up-icon.png" alt=""></span></button>
</div>
<div class="btn-group order-type-buttons col-12" role="group" aria-label="second group">
<button type="button" class="btn order-type-btn-blue col-4"><span class="col-8 button-text">Refund</span><span class="col-4 span-img"><img class="img-fluid" src="images/icon%20files/refund-icon.png" alt=""></span></button>
<button type="button" class="btn order-type-btn-blue col-4"><span class="col-8 button-text">Room Service</span><span class="col-4 span-img"><img class="img-fluid" src="images/icon%20files/room-service-icon.png" alt=""></span></button>
<button type="button" class="btn order-type-btn-blue col-4"><span class="col-8 button-text">Take</span><span class="col-4 span-img"><img class="img-fluid rounded" src="images/icon%20files/take-out-icon.png" alt=""></span></button>
</div>
</div>
</div>
</div>
</div>
This is the CSS:
.button-text{
padding-left: 0;
padding-right: 0;
}
.order-type-btn-blue{
background-color: #0082d5;
font-size:14px;
color: white;
text-transform: uppercase;
margin: 2px 2px 2px 2px;
padding-right: 0;
padding-left: 0;
}
.order-type-buttons {
padding-right: 0;
padding-left: 0;
}
.span-img{
padding-right: 0;
padding-left: 0;
}
Here's how the buttons are appearing on my page: