I am using Bootstrap Carousel which has images with varying height. So this causes the Slider to jump up and down in height.
What i want to achieve is set the height of carousel to a height based on the following caluclation
Browser Window Height - Header Height(fixed) - Footer Height (fixed)
so that the slider can take the max height of the window and resizes based on the users browser window.
I have the following Code
<div id="carousel-example-generic">
<div data-ride="carousel" class="carousel slide carousel-fade" id="carousel-example-captions">
<div class="carousel-inner">
<div class="item"> <img alt="900x500" src="images/slider/img1.jpg" class="img-responsive">
<div class="carousel-caption">
<h3>First slide label</h3>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div>
</div>
<div class="item active"> <img alt="900x500" src="images/slider/img2.jpg" class="img-responsive">
<div class="carousel-caption">
<h3>Second slide label</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="item"> <img alt="900x500" src="images/slider/img3.jpg" class="img-responsive">
<div class="carousel-caption">
<h3>Third slide label</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div>
</div>
</div>
<a data-slide="prev" href="#carousel-example-captions" class="left carousel-control"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a data-slide="next" href="#carousel-example-captions" class="right carousel-control"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div>
</div>
When i set a height to the image as follows the image ratio gets distorted and does not display in the full aspect ratio.
Link: http://play.mink7.com/suoll/v2/
How the image is
and how its shown
When i dynamically set the height of the image it gets distorted as follows