I am currently using Bootstrap 5 to create a carousel with multiple cards, but I am facing an issue where only one card is displayed per slide. How can I modify it so that 3 cards are shown per slide?
Should I utilize rows and columns for this purpose?
Alternatively, is there a way to integrate Bootstrap 4 and Bootstrap 5 together? I tried using both but encountered compatibility issues.
Below is the modified carousel code using Bootstrap 5:
<div id="carouselExample" class="carousel slide">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="media-container">
<div class="course">
<div class="media-preview">
</div>
<div class="media-info">
<h6 class="tanggalMedia1">20 MARET 2023</h6>
<h5 class="descBerita1">Lorem ipsum dolor sit <br> amet consectetu</h5>
<div class="btnRead">
<a href="#">→</a>
</div>
</div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="media-container">
<div class="course">
<div class="media-preview">
</div>
<div class="media-info">
<h6 class="tanggalMedia1">20 MARET 2023</h6>
<h5 class="descBerita1">Lorem ipsum dolor sit <br> amet consectetu</h5>
<div class="btnRead">
<a href="#">→</a>
</div>
</div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="col">
<div class="media-container">
<div class="course">
<div class="media-preview">
</div>
<div class="media-info">
<h6 class="tanggalMedia1">20 MARET 2023</h6>
<h5 class="descBerita1">Lorem ipsum dolor sit <br> amet consectetu</h5>
<div class="btnRead">
<a href="#">→</a>
</div>
</div>
</div>
</div>
<div class="media-container">
<div class="course">
<div class="media-preview">
</div>
<div class="media-info">
<h6 class="tanggalMedia1">20 MARET 2023</h6>
<h5 class="descBerita1">Lorem ipsum dolor sit <br> amet consectetu</h5>
<div class="btnRead">
<a href="#">→</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExample" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExample" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
CDN Scripts:
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="94f6fbfbe0e7e0e6f5e4d4a1baa7baa4b9f5f8e4fcf5a5">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="31535e5e45424543504171041f021f011c505d41595000">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">