javascript - Carousel padding on first item -


i'm working owl carousel using stage padding: http://www.owlcarousel.owlgraphic.com/demos/stagepadding.html

i'm using carousel loop:false. i'm trying first item without padding on left , after slide keeps same padding both items on left , right.

so @ page load should this: enter image description here

and on slide: enter image description here

using stage-padding gives padding both left , right. giving space on first item shown in test: http://pixelbypixel.comli.com/owl/

the problem if remove padding-left (to first item attached on left without margin) result on slide: enter image description here

any idea how can solve this?

this markup:

<div class="owl-carousel">     <div class="item"><h4>1</h4></div>     <div class="item"><h4>2</h4></div>     <div class="item"><h4>3</h4></div>     <div class="item"><h4>4</h4></div>     <div class="item"><h4>5</h4></div>     <div class="item"><h4>6</h4></div> </div>  $('.owl-carousel').owlcarousel({     stagepadding: 40,     loop:false,     margin:2,     nav:false,     items:2 }) 

its inline style, try find line , remove padding-left this:

<div class="owl-stage" style="transform: translate3d(0px, 0px, 0px);  transition: 0s ease 0s; width: 11132px;  padding-left: 0px; padding-right: 40px;">.. </div> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -