When adding images to a carousel, I encountered an issue where only the top half of the image is displayed on the page. It seems that the image is not adjusting itself to fit the div container properly, resulting in only a portion of it being visible behind the div.
Is there a way to ensure that the entire image fits within the dimensions of the div container?
I attempted to use object-fit in CSS to address this issue, but unfortunately, it did not resolve the problem.
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="./photos/za.jpg" alt="Los Angeles" style="width:100%;">
</div>
<div class="item">
<img src="./photos/india.jpg" alt="Chicago" style="width:100%;">
<div class="centered">Centered</div>
</div>
<div class="item">
<img src="./photos/thai.jpg" alt="New york" style="width:100%;">
</div>
</div>
What kind of CSS styling can be used to make sure that the entire image is fully displayed within the div container?