https://i.sstatic.net/zYpbd.pngI'm having trouble making my carousel responsive on my webpage. I tried setting its width to 100% within a class, but it doesn't seem to be working. How can I ensure that the carousel's width is 100% and still responsive?
Here is the CSS class I used to try and set the width:
.cwidth{
min-width: 100%;
}
And here is the code for my carousel:
<div class="container">
<h2>Carousel Example</h2>
<div id="myCarousel" class="carousel slide cwidth" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="Images/LIB01.png" alt="LIB Image" style="width:100%;">
<div class="carousel-caption">
<h3>Some Text</h3>
<p>Some Text</p>
</div>
</div>
<div class="item">
<img src="Images/LIB02.png" alt="LIB Image" style="width:100%;">
<div class="carousel-caption">
<h3>Some Text</h3>
<p>Some Text</p>
</div>
</div>
<div class="item">
<img src="Images/LIB03.png" alt="LIB Image" style="width:100%;">
<div class="carousel-caption">
<h3>Some Text</h3>
<p>Some Text</p>
</div>
</div>
<div class="item">
<img src="Images/LIB04.png" alt="LIB Image" style="width:100%;">
<div class="carousel-caption">
<h3>Some Text</h3>
<p>Some Text</p>
</div>
</div>
<div class="item">
<img src="Images/LIB05.png" alt="LIB Image" style="width:100%;">
<div class="carousel-caption">
<h3>Some Text</h3>
<p>Some Text</p>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>