Hyper Learn
Hyper Learn

Reputation: 45

how edit or disable width in owl-item?

how can to edit or disable width "owl-item" in owl carousel?

my Meaning inside the photo : enter image description here

I acted through

( style.css > .owl-item { width : 80px;} ) , but did not work

Upvotes: 0

Views: 10807

Answers (2)

Prav
Prav

Reputation: 1

Use the stagePadding option, https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html, this will prevent padding issues with other items on carousel

(document).ready(function(){
 $(".owl-carousel").owlCarousel({
  nav:true,
  stagePadding: 90,
   .......

Upvotes: 0

Sivaprasath
Sivaprasath

Reputation: 400

If you want to override the div's width in style.css -> change it as below,

.owl-item { width : 80px !important; }

!important -> Specified style Will be applied to the css elements irrespective of the style being mentioned in the element.

If you want to know how it get applied just have a look in the link

Hope it helps.

Upvotes: 3

Related Questions