I have successfully added the Bootstrap 5 website slider and it is working well. However, I am wondering how to position the slider at the top right with bullet points and without the back and previous arrows. Does anyone know the correct way to achieve this?
Here is my sample image for reference: https://i.sstatic.net/5xsVg.png
.carousel-indicators {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
}
.carousel-indicators button {
width: 16px;
height: 16px;
border-radius: 50%;
background-color: #fff;
border: none;
margin-right: 10px;
margin-bottom: 0;
}
.carousel-indicators button.active {
background-color: #000;
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d7f7272696e696f7c6d5d28332d332f">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e1828e9384a1d3cfd8cfd3">[email protected]</a>/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="24464b4b50575056455464110a140a16">[email protected]</a>/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<div id="myCarousel" class="carousel slide" data-bs-ride="carousel">
<div class="row">
<div class="col-md-12">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row">
<div class="col-md-6">
<img src="https://via.placeholder.com/150x100/cccccc/ffffff" class="d-block w-100" alt="Slide 1">
</div>
<div class="col-md-6">
<h3>Slide 1</h3>
<p>Some sample text.</p>
</div>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-md-6">
<img src="https://via.placeholder.com/150x100/cccccc/ffffff" class="d-block w-100" alt="Slide 2">
</div>
<div class="col-md-6">
<h3>Slide 2</h3>
<p>Some sample text.</p>
</div>
</div>
</div>
<div class="carousel-item">
<div class="row">
<div class="col-md-6">
<img src="https://via.placeholder.com/150x100/cccccc/ffffff" class="d-block w-100" alt="Slide 3">
</div>
<div class="col-md-6">
<h3>Slide 3</h3>
<p>Some sample text.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" 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="#myCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>