O'Reilly logo

Bootstrap for Rails by Syed Fazle Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding captions to the slides

Captions can be easily added to each slide item by inserting a div element with the .carousel-caption class. This element will hold two different elements: a heading and paragraph element. You have the liberty to use either one of them or both. Take the following code as an example:

<div class="item">
  <img src="images/book1.jpg" alt="Book 1">
    <div class="carousel-caption">
    <h3>This is the first slideshow</h3>
    <p>Lorem ipsum donor.</p>
  </div>
</div>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required