jquery - How to place indicators in seperate columns and left and right controls in bottom of in bootstrap carousel -


please consider code:

<div class="container">     <div id="mycarousel" class="carousel slide" data-ride="carousel">         <!-- indicators -->         <ol class="carousel-indicators">             <li data-target="#mycarousel" data-slide-to="0" class="active"></li>             <li data-target="#mycarousel" data-slide-to="1"></li>             <li data-target="#mycarousel" data-slide-to="2"></li>             <li data-target="#mycarousel" data-slide-to="3"></li>         </ol>         <div class="carousel-inner" role="listbox">             <div class="item active">                 <div class="row">                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/1.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/2.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/3.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/4.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/5.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/6.jpg" alt="image" /></a>                     </div>                 </div>             </div>              <div class="item">                 <div class="row">                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/7.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/8.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/9.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/10.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/11.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/12.jpg" alt="image" /></a>                     </div>                 </div>             </div>             <div class="item">                 <div class="row">                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/13.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/14.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/15.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/16.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/17.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/18.jpg" alt="image" /></a>                     </div>                 </div>             </div>             <div class="item">                 <div class="row">                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/19.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/10.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/11.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/12.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/13.jpg" alt="image" /></a>                     </div>                     <div class="col-md-2">                         <a href="#" class="thumbnail">                             <img src="images/14.jpg" alt="image" /></a>                     </div>                 </div>             </div>         </div>          <a class="left carousel-control" href="#mycarousel" role="button" data-slide="prev">             <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>             <span class="sr-only">previous</span>         </a>         <a class="right carousel-control" href="#mycarousel" role="button" data-slide="next">             <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>             <span class="sr-only">next</span>         </a> </div> 

and css :

.carousel-inner > .item > img, .carousel-inner > .item > > img {     width: 70%;     margin: auto; }  .thumbnail img {     max-width: 100%;     height: 120px; } 

this fiddle: demo

i want place left , right arrows in separate columns (but have 6 item in row) , indicators in bottom of slider, image:

enter image description here

how can this?

thanks

i made playing positions absolute , % make responsive, comented css can check why make rules :)

css

#mycarousel {     width: 85%; /* resize carousel have spaces on left-right arrows*/     position: absolute;     left:  50%; /* forces carousel on middle */     transform: translatex(-50%); /* forces carousel on middle */     margin-bottom:35px; /* important show bullets down carousel , let overflow:hidden show them */ } .carousel-indicators {     bottom:-35px; /* take outsite arrows*/     background-color: green; /* color show them */ } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .glyphicon-chevron-left{        left: -45%; /* left arrow absolute position negative left*/ } .icon-next, .carousel-control .glyphicon-chevron-right {        left: 115% !important; /* hard override right arrow position, without important dosen't works. */ } 

demo


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -