"Carousel Inside Modal"
Bootstrap 3.2.0 Snippet by beaucaprice

<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container text-center"> <h1> Click Me </h1> <!-- Large modal --> <button class="btn btn-default" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button> <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Wrapper for slides --> <div class="carousel-inner"> <div class="item active"> <img class="img-responsive" src="http://placehold.it/1200x600/555/000&text=One" alt="..."> <div class="carousel-caption"> One Image </div> </div> <div class="item"> <img class="img-responsive" src="http://placehold.it/1200x600/fffccc/000&text=Two" alt="..."> <div class="carousel-caption"> Another Image </div> </div> <div class="item"> <img class="img-responsive" src="http://placehold.it/1200x600/fcf00c/000&text=Three" alt="..."> <div class="carousel-caption"> Another Image </div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div> </div> </div> </div> </div>
body { padding-top: 20px; } .btn-default { top: 25%; left:25%; color: #999; background: #fffccc; }

Related: See More


Questions / Comments:

carousel is not working??? why?

nj () - 7 years ago - Reply 1


carousel is not working??? why?

Malika lalmas () - 7 years ago - Reply 0


Worked like a charm be blessed

Onest () - 3 years ago - Reply 0


The first picture displayed in the carousel is not always the first picture listed in the html. How to control which picture is displayed first?

Michael William Ryan () - 7 years ago - Reply 0


how do i achieve same functionality instead of buttons i want same carousel will open in auto-mode. can you please suggest?

Gunwant Suryawanshi () - 7 years ago - Reply 0