I'm facing an issue with my carousel images being stretched. Can anyone provide assistance on how to prevent the stretching?
https://i.sstatic.net/5CIB9.jpg
Below is my code snippet:
<div class="carousel-inner">
<div class="carousel-item active col-xs-12 col-sm-12">
<img src="/images/winkelstufe.jpg" class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h1>lorem</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore, quis!</p>
</div>
</div>
Here is the relevant CSS:
.carousel-item {
height: 32rem;
}
.carousel-item > img {
position: absolute;
top: 0;
left: 0;
height: 32rem;
display: block;
}
.carousel {
margin-bottom: 4rem;
position: relative;
}
.carousel-caption {
bottom: 3rem;
z-index: 10;
}
Can someone guide me on how to fix the image stretching issue in my carousel?