Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap Carousel

I have implemented the carousel on my webpage as follows

<div class="container-fluid">

            <div id="myCarousel" class="carousel slide">
                <!-- Carousel items -->
                <div class="carousel-inner">
                <div class="active item">
                    <img src="/public/images/Lighthouse.jpg">
                </div>
                <div class="item">
                    <img src="/public/images/Lighthouse.jpg">
                </div>
                <div class="item">
                    <img src="/public/images/Lighthouse.jpg">
                </div>
                </div>
                <!-- Carousel nav -->
                <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
                <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
    </div><!--End of Carousel-->

I would like it to remain responsive, which at present it is, the picture adjusts as the screen gets smaller. However the carousel fills the whole page (Width) and I would like to make it smaller and have it sit in the center of the page. I have given a width for .carousel but this seems to effect the responsiveness.

Does anyone know how to customize this plugin or have done this in the past

Any help appreciated

Thanks

like image 469
Richlewis Avatar asked Jan 24 '26 10:01

Richlewis


1 Answers

media Query solves this issue as I had given the carousel a width

@media (max-width:600px) {
  .carousel {
  width: 100%;
  }
 } 
like image 174
Richlewis Avatar answered Jan 26 '26 02:01

Richlewis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!