Bootstrap Carousel width and picture issues -


been working bootstrap first time , i've run issue carousel.

when create carousel instantly fills entire width of screen. in case want carousel span far left home button first right login button.

also, possible have carousel adjust pictures? same dimensions, whatever reason carousel seems zoom on pictures.

i'm hoping bit more experience can direct me towards appropriate changes, or give more information carousels. thank you

demo: my wip emulation demo

css:

   /* customize carousel -------------------------------------------------- */  /* carousel base class */ .carousel {   height: 500px;   margin-bottom: 60px; } /* since positioning image, need out caption */ .carousel-caption {   z-index: 10; }  /* declare heights because of positioning of img element */ .carousel .item {   height: 500px;   background-color: #777; } .carousel-inner > .item > img {   position: absolute;   top: 0;   left: 0;   min-width: 100%;   height: 500px; } 

carousel:

          <!-- carousel             ================================================== --> <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>   </ol>      <div class="carousel-inner" role="listbox">     <div class="item active">       <img class="first-slide" src="images/service.png" alt="first slide">       <div class="container">                  <div class="carousel-caption">           <h1>place holder</h1>           <p>place holder</p>         </div>       </div>     </div>     <div class="item">       <img class="second-slide" src="images/classic.png" alt="second slide">        <div class="container">                     <div class="carousel-caption">           <h1>place holder</h1>           <p>place holder</p>         </div>       </div>     </div>                    <div class="item">       <img class="third-slide" src="images/new2016.png" alt="third slide">       <div class="container">                    <div class="carousel-caption">                           <h1>ph</h1>           <p>ph</p>         </div>       </div>     </div>             <div class="item">       <img class="second-slide" src="images/a6lease.png" alt="second slide">       <div class="container">         <div class="carousel-caption">           <h1>ph</h1>                                                                                                                                                                                                                          <p>ph</p>         </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-s$     <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></sp$     <span class="sr-only">next</span>   </a>     </div><!-- /.carousel -->    

you can use grid system that. put carousel inside row , inside column spanning width need, e.g. col-lg-10 , add button mentioning in column cl-lg-2.

i prepared jsfiddle @ http://jsfiddle.net/8rd9tfwf/1/

    <div class="row"> <div class="col-md-10 col-lg-10 col-sm-10">     <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>       </ol>          <div class="carousel-inner" role="listbox">         <div class="item active">           <img class="first-slide" src="images/service.png" alt="first slide">           <div class="container">                      <div class="carousel-caption">               <h1>place holder</h1>               <p>place holder</p>             </div>           </div>         </div>         <div class="item">           <img class="second-slide" src="images/classic.png" alt="second slide">            <div class="container">                         <div class="carousel-caption">               <h1>place holder</h1>               <p>place holder</p>             </div>           </div>         </div>                        <div class="item">           <img class="third-slide" src="images/new2016.png" alt="third slide">           <div class="container">                        <div class="carousel-caption">                               <h1>ph</h1>               <p>ph</p>             </div>           </div>         </div>                 <div class="item">           <img class="second-slide" src="images/a6lease.png" alt="second slide">           <div class="container">             <div class="carousel-caption">               <h1>ph</h1>                                                                                                                                                                                                                              <p>ph</p>             </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-s$         <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></sp$         <span class="sr-only">next</span>       </a>         </div>    </div>    <div class="col-md-2 col-lg-8 col-sm-2"></div>                   

edit: updated jsfiddle. had copied broken html before, it's fixed.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -