When trying to adjust the width of a div, everything works smoothly, but the same cannot be said for adjusting the height.
I attempted to experiment with the bootstrap carousel on codeply, but unfortunately, it didn't behave as anticipated:
HTML code:
<div id="carouselExampleSlidesOnly" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." class="d-block w-100" alt="..." style="background-color: red;">
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="..." style="background-color: yellow;">
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="..." style="background-color: blue;">
</div>
</div>
</div>
CSS code:
.carousel-item{
height: 500px;
width: 300px; }
The width changes, but the height remains unaffected.