In order to achieve my goal, I am aiming to design a collection of buttons arranged in a grid layout within a bootstrap card element. These buttons should be positioned along the right border of the containing card and remain confined within it. The intention is to later populate these buttons with images, essentially creating a grid of image buttons.
Here is the code snippet I have written:
HTML:
<div class="col-sm-20 card-deck mt-3">
<div class="card mb-3 mr-3 ml-3 shadow bg-white rounded">
<div id="buttonpanel" class="container buttonpanel">
<div class="row">
<div class="box col">Filtri</div>
<div class="box col">Filtri</div>
<div class="w-100"></div>
<div class="box col">Filtri</div>
<div class="box col">Filtri</div>
</div>
</div>
<div class="card-body">
<div id="id" style="display: none;">2 </div>
<h4 class="card-title">
<a href="/clinic/jeslinclinic/"> Dr Jeslin's Clinic</a>
</h4>
<h6 class="card-subtitle mb-2 text-muted">Label: <a href="/clinic/jeslinclinic/">jeslinclinic</a></h6>
<p class="card-text">Phone: <a href="tel:9">9</a></p>
<p class="card-text">About Clinic: Dr Jeslin's Eye Clinic is a topnotch Eye Clinic</p>
<p class="card-text"><a href="/clinic/jeslinclinic/">Homepage</a></p>
<p class="card-text">External Website: <a href="https://mysite">https://mysite</a></p>
<div id="docbtngp" class="d-flex flex-row">
<a href="/clinic/jeslinclinic/editclinic" class="btn btn-primary mr-1 mybtndocedit" data-id="2">
<i class="fas fa-user-edit"></i>
</a>
<a href="/clinic/jeslinclinic/live" class="btn btn-primary mr-1 mybtndocedit" data-id="2">
<i class="fas fa-clipboard-list"></i> Waiting</a>
<a href="/clinic/jeslinclinic/seen" class="btn btn-primary mr-1 mybtndocedit" data-id="2">
<i class="fas fa-check-circle"></i> Seen</a>
<a href="/clinic/jeslinclinic/register" class="btn btn-primary mr-1 mybtndocedit" data-id="2">
<i class="fas fa-book-open"></i> Register</a>
<a href="/clinic/jeslinclinic/checkin" class="btn btn-primary mr-1 mybtndocedit" data-id="2">
<i class="fas fa-check"></i> Checkin</a>
<a href="/clinic/jeslinclinic/doctor/edit/slots/2" class="btn btn-primary mr-1 mybtndocedit" data-id="2">
<i class="fas fa-th-large"></i> Consultation Time</a>
</div>
</div>
</div>
</div>
CSS:
.box {
background-color: #3C8DBC;
color: #fff;
text-align: center;
margin-bottom: 0px;
margin-top: 0px;
}
.buttonpanel {
position: relative;
right: 0;
height: 100%;
top: 0px;
margin-right: 0;
margin-bottom: 0;
margin-top: 0;
}
h4, .h4 {
font-size: 1.4125rem;
font-weight: 500;
}
This is how my output appears:
https://i.sstatic.net/wTiD7.png
The desired outcome is as follows: