When I have a row of Bootstrap 5 cards that display correctly, but then add a sidebar that causes them to stack in a column instead of remaining in a row. How can I maintain the row layout even with the addition of a sidebar using specific CSS classes or properties?
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="61030e0e15121513001121544f514f53">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<div class="card-content">
<p>Card Name</p>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<div class="card-content">
<p>Card Name</p>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<div class="card-content">
<p>Card Name</p>
</div>
</div>
</div>
</div>
</div>
</div>
The cards, when I added the sidebar:
<div class="container-fluid">
<div class="row">
<nav id="sidebar" class="col-md-3 col-lg-2 d-md-block bg-light sidebar vh-100">
<div class="position-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a href="" class="nav-link active">Dashbaord</a>
</li>
<li class="nav-item">
<a href="" class="nav-link">Page 1</a>
</li>
<li class="nav-item">
<a href="" class="nav-link">Page 2</a>
</li>
</ul>
</div>
</nav>
<main class="col-md-3 col-lg-3 px-md-4">
<div class="card my-3">
<div class="card-body">
<a class="btn btn-primary" href="{% url 'Room_Content' room_type.id %}">
<p>Card Name</p>
</a>
</div>
</div>
<div class="card my-3">
<div class="card-body">
<a class="btn btn-primary" href="{% url 'Room_Content' room_type.id %}">
<p>Card Name</p>
</a>
</div>
</div>
<div class="card my-3">
<div class="card-body">
<a class="btn btn-primary" href="{% url 'Room_Content' room_type.id %}">
<p>Card Name</p>
</a>
</div>
</div>
</main>
</div>
</div>
Is there a solution with CSS classes or properties that will allow me to keep the cards displayed in a row layout despite having a sidebar in place?