I am encountering an issue while trying to implement a bootstrap carousel within a CSS flexbox layout. The problem lies in incorrect HTML code causing the second slide of the carousel not to display. Although I can navigate to the next slide using the next button, the second slide remains invisible.
Shown below is the relevant code snippet:
.news {
display: flex;
height: 600px;
width: 100%;
}
#flex-box-1 {
width: 50%;
height: 100%;
background-color: green;
}
#flex-box-2 {
width: 50%;
height: 100%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>UniLab</title>
<script src="https://kit.fontawesome.com/b51b7dd055.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="81e3eeeef5f2f5f3e0f1c1b5afb2afb0">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<section class="news">
<div id="flex-box-1">
<div id="places">
<h2>WORLD NEWS</h2>
<hr>
<h2>Amazing places in America to visit.</h2>
<p>For some reason — this country, this city, this neighborhood, this particular street — is the place you are living a majority of your life in.</p>
<button onclick="location.href = './Desktop 3/main.html';" id="myButton">LEARN MORE</button>
</div>
</div>
<div id="flex-box-2" class="container">
<div id="news-header" class="column">
<div id='box-1'>
<h2>MORE NEWS</h2>
</div>
<div id='box-2'>
<div class="col-6 text-right">
<a class="btn" href="#carouselExampleIndicators2" role="button" data-slide="prev">
<i class="fa-solid fa-angle-left"></i>
</a>
<a class="btn" href="#carouselExampleIndicators2" role="button" data-slide="next">
<i class="fa-solid fa-angle-right"></i>
</a>
</div>
</div>
</div>
<hr>
<div id="carouselExampleIndicators2" class="carousel slide" data-ride="carousel" data-interval="false">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="column">
<article class="card">
<h3 class="pink">TRAVEL</h3>
<h3 class="article-title">Article title</h3>
<p>Lorem ipsum dolor sit amet, ipsum labitur lucilius mel id, ad has appareat…</p>
<i class="icon-clock"></i>
<span>2 mins ago</span>
</article>
<article class="card">
<h3 class="pink">TECHNOLOGY</h3>
<h3 class="article-title">Article title</h3>
<p>Lorem ipsum dolor sit amet, ipsum labitur lucilius mel id, ad has appareat…</p>
<i class="icon-clock"></i>
<span>2 mins ago</span>
</article>
</div>
<div class="carousel-item">
<div class="column">
<article class="card">
<h3 class="pink">TRAVEL</h3>
<h3 class="article-title">Article title</h3>
<p>Lorem ipsum dolor sit amet, ipsum labitur lucilius mel id, ad has appareat…</p>
<i class="icon-clock"></i>
<span>2 mins ago</span>
</article>
<article class="card">
<h3 class="pink">TECHNOLOGY</h3>
<h3 class="article-title">Article title</h3>
<p>Lorem ipsum dolor sit amet, ipsum labitur lucilius mel id, ad has appareat…</p>
<i class="icon-clock"></i>
<span>2 mins ago</span>
</article>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- <script src="./scripts.js"></script> -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="20504f505045520e4a5360110e11140e17">[email protected]</a>/dist/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a9cbc6c6dddadddbc8d9e99d879a8798">[email protected]</a>/dist/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
I greatly appreciate any assistance provided. <3