Hi,
I am trying to get bootstrap carousel image and caption to stay side by side, i.e. image width 5 columns, caption width 7 columns.
No matter what I tried can’t get it, the image doesn’t resize to the column width, thus the caption stays on top of image; it dows stack when resizing, thus the image does not resize (gets cut in width).
I did manage to have the caption above, or below the image by changing the position:absolute to relative, but I’d like to have the side by side, and be able to change column number (width).
Test page here:
holytablets dot org/gallery_test_2
Thank you
These are the html, and css I am using
html
<div id="fz-gallery-slider-1" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<div class="col-xs-5">
<img src="images_test/slider_test_01.jpg" />
</div>
<div class="col-xs-7">
<div class="carousel-caption">
<h2>Slide 1</h2>
</div>
</div>
</div>
<div class="item">
<div class="col-sx-5">
<img src="images_test/slider_test_02.jpg" />
</div>
<div class="col-xs-7">
<div class="carousel-caption">
<h2>Slide 2</h2>
</div>
</div>
</div>
<div class="item">
<div class="col-xs-5">
<img src="images_test/slider_test_03.jpg" />
</div>
<div class="col-xs-7">
<div class="carousel-caption">
<h2>Slide 3</h2>
</div>
</div>
</div>
</div>
<div class="controllers col-sm-8 col-xs-12">
<!-- Controls -->
<a class="left carousel-control" href="#fz-gallery-slider-1" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#fz-gallery-slider-1" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
<div class="controllers col-sm-8 col-xs-12">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#fz-gallery-slider-1" data-slide-to="0" class="active"></li>
<li data-target="#fz-gallery-slider-1" data-slide-to="1"></li>
<li data-target="#fz-gallery-slider-1" data-slide-to="2"></li>
</ol>
</div>
</div>
css
.carousel-caption {
position: relative;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
padding-top: 0;
padding-bottom: 0;
color: #000;
text-align: center;
text-shadow: none;
//text-shadow: 0 1px 2px rgba(0,0,0,.6);
}