"Fullscreen carousel, controls inside container"
Bootstrap 3.0.0 Snippet by asanti82

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.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 id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators"> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-generic" data-slide-to="1"></li> </ol> <!-- Wrapper for slides --> <div class="carousel-inner" role="listbox"> <div class="item active" style="background-image:url('http://placehold.it/1024x300');"> <div class="custom-caption"> Hello..Slide 1 </div> </div> <div class="item" style="background-image:url('http://placehold.it/1024x300');"> <div class="custom-caption"> Slide 2 </div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> </a> </div> <div class="container" id="main"> <h1>This Content is inside the container</h1> </div>
#main{ background:#000; color:#fff; } .carousel{ height:300px; } .carousel .item{ height:300px; background-size:cover; background-repeat:no-repeat; background-position:center; } .carousel .item .custom-caption{ width:60%; margin:0 auto; text-align:center; padding:10% 0; font-size:30px; color:#fff; font-weight:600; } .carousel .carousel-control.left, .carousel .carousel-control.right, .carousel .carousel-control.left:hover, .carousel .carousel-control.right:hover{ background:none; } .carousel .carousel-control{ width: 20px; height:20px; top:50%; } .carousel .carousel-control span{ position:relative; left:0; }
jQuery(function($){ var demo = { init : function(){ this.carouselControls(); $(window).resize(function(){ demo.carouselControls(); }); }, carouselControls : function(){ var $container = $('#main'); var $slider = $('#carousel-example-generic'); var padding = 15; var rt = ($(window).width() - ($container.offset().left + $container.outerWidth())); $slider.find('.right.carousel-control').css('right', rt + padding).show(); $slider.find('.left.carousel-control').css('left', rt + padding).show(); } }; demo.init(); });

Related: See More


Questions / Comments: