I am attempting to find a way to verticially center an image inside of my viewport for the carousel. Currently the images are working fine and it is resizing the image to the size of the viewport on the width. But I want to use the center of the image and crop the top and bottom of the photo.
Here is the HTML:
<div class="carousel slide hero">
<div class="carousel-inner">
<div class="active item">
<img src="img/hero/1.jpg" />
</div>
<div class="item">
<img src="img/hero/2.jpg" />
</div>
<div class="item">
<img src="img/hero/3.jpg" />
</div>
</div>
<a class="carousel-control left" href=".hero" data-slide="prev">‹</a>
<a class="carousel-control right" href=".hero" data-slide="next">›</a>
</div><!-- hero -->
and the small bit of css:
.carousel-inner {
height: 320px;
overflow: hidden;
}
Any help is greatly appreciated. I want it so that if they upload any size photo it can be considered usable.