See the following two screenshots of the same carousel from Bootstrap 3 with different size images in it.
First screenshot:
Second screenshot:
Html for the inner carousel.
<div class="carousel-inner" role="listbox">
.
.
<div class="item">
<img class="img-responsive center-block" src="...">
</div>
.
.
</div>
Both the carousel and the table are contained in a class="row"
with both inside it's own class="col-md-6"
.
As you can see this is ugly as the carousel keeps changing heights with the different heights of the images. I won't accept "Your source images should all have the same heights" as an answer.
I want the carousel be of a fixed height and the images should scale accordingly (preferably the same height as the table). Also if possible I'd like to fix this with one of the bootstrap classes provided instead of adding custom css. I've already read to add a fixed width (or height) for the carousel, but I don't find this to be a good solution, because
- Custom css
- It's not responsive, it should stay
col-md-6
being half of the row!
So does anyone know an elegant, robust and responsive way of fixing this problem? Maybe with Javascript?
NOTE I know there are other carousels out there, but suggesting that is not an answer for my question. My question addresses bootstrap's carousel.