Apologies for the confusing title, but I'm struggling to find the right words to explain my issue.
How can I properly fit my image labeled as "carouselMap" within the div named "carouselItem" while maintaining an aspect ratio of 2/3 and ensuring the width of the map is 100% of the "carouselItem"'s width?
I have created a visual aid using a paint "drawing" to illustrate my question.
<div class="carouselItem">
<img class="carouselMap" src="../assets/myMap.png" />
</div>
.carouselItem {
height: 100%;
width: 100%;
border: 1px solid black;
}
.carouselMap {
aspect-ratio: 2/3;
width: 100%;
}
https://i.sstatic.net/8MIACB8T.png
Your assistance is greatly appreciated 🙏