Right now the carousel image is expanded full width and is responsive, but it’s too big. How do I adjust the size to make it smaller? I am using owl carousel. There is an awkward white gap after adding in the carousel, on the right size. The horizontal scrollbar appears where as before without the carousel, there was no horizontal scrollbar and the width of the image expanded full width without having to use the horizontal scrollbar.
What is wrong with my code? Sorry I can’t upload the site because I was not giving permission to access to the companies server yet. I am just building it locally for now.
<section id="app" class="section-padding">
<!-- carousel -->
<div class="containter">
<div class="row">
<div class="col-sm-12 text-center">
<h2>How It Works</h2>
</div>
<div id="owl-slider" class="owl-carousel owl-theme">
<img src="img/browsemovie.png" alt="browse movie" class="img-responsive">
<img src="img/browsemovie.png" alt="groups" class="img-responsive">
<img src="img/browsemovie.png" alt="popular spot" class="img-responsive">
<img src="img/browsemovie.png" alt="chats" class="img-responsive">
</div>
</div>
</div>
<!-- end carousel -->
</section>
<script>
$(document).ready(function() {
$("#owl-slider").owlCarousel({
autoplay: true,
autoplayHoverPause: true,
autoplayTimeout: 4000,
items: 1,
loop: true,
})
})
</script>
carousel-slider .item img{
display: block;
width: 100%;
height: auto;
max-height: 200px !important;
}
#owl-slider .owl-prev {
width: 40px;
height: 40px;
background: url(../img/carousel-arrow-prev.png) no-repeat center center;
border: 3px solid #ffffff;
float: left;
margin-left: 10px;
position: relative;
border-radius: 50%;
opacity: 0.5;
-webkit-transition: all .35s ease-in-out;
-moz-transition: all .35s ease-in-out;
-o-transition: all .35s ease-in-out;
transition: all .5s ease-in-out;
z-index: 10;
}
#owl-slider .owl-next {
width: 40px;
height: 40px;
background: url(../img/carousel-arrow-next.png) no-repeat center center;
border: 3px solid #ffffff;
float: right;
margin-right: 13px;
position: relative;
border-radius: 50%;
opacity: 0.5;
-webkit-transition: all .35s ease-in-out;
-moz-transition: all .35s ease-in-out;
-o-transition: all .35s ease-in-out;
transition: all .5s ease-in-out;
z-index: 10;
}
#owl-slider .owl-prev:hover, #owl-slider .owl-next:hover {
opacity: 0.7;
-webkit-transition: all .35s ease-in-out;
-moz-transition: all .35s ease-in-out;
-o-transition: all .35s ease-in-out;
transition: all .35s ease-in-out;
}
.owl-slider .owl-buttons {
height: 30px;
left: 0;
right: 0;
top: 0;
bottom: 50px;
margin: auto;
z-index: -999999;
}