Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stagePadding on one side #172

Open
ghost opened this issue Jun 19, 2014 · 24 comments
Open

stagePadding on one side #172

ghost opened this issue Jun 19, 2014 · 24 comments

Comments

@ghost
Copy link

ghost commented Jun 19, 2014

Hi, is this possible?

@witrin
Copy link
Contributor

witrin commented Jun 19, 2014

Could you show us an example (e.g. screendesign) or showcase where this would make sense?

@ghost
Copy link
Author

ghost commented Jun 19, 2014

For fixed width items and on spesific screen sizes

Den 19. juni 2014 kl. 16:48 skrev Artus Kolanowski notifications@github.com:

Could you show us an example (e.g. screendesign) or showcase where this would make sense?


Reply to this email directly or view it on GitHub.

@witrin
Copy link
Contributor

witrin commented Jun 19, 2014

I don't get it really :/ ... A picture would be more meaningful.

@ghost
Copy link
Author

ghost commented Jun 19, 2014

http://cl.ly/image/1M440Z440F06
The gray boxes have a fixed width of 250px
only what is in the viewport(1px border box) should be visible.

Maybe this is possible with the current slider even? am i missing something?

@witrin
Copy link
Contributor

witrin commented Jun 19, 2014

Does it look like that all items have a fixed size over all screens? Or should have ...

@witrin
Copy link
Contributor

witrin commented Jun 19, 2014

In this case it should work when you just disable options.responsive = false I think.

@witrin
Copy link
Contributor

witrin commented Jun 19, 2014

Maybe I'm wrong and you have also to set auto width too and the fixed width for your items by css.

@witrin
Copy link
Contributor

witrin commented Jun 19, 2014

@nicetransition
Copy link

I had the same issue, I resolved it by adding a negative right: of my stagePadding's value on .owl-stage class .
For example, stagePadding: 20:

.owl-stage {
    right: -10px;
}

@gaja33
Copy link

gaja33 commented Sep 2, 2015

even im facing same problem im using stage padding i was able to remove padding left but i want to remove padding from right either and black space on owl-stage class..

@nuflowx
Copy link

nuflowx commented May 11, 2016

When setting stagePadding it does so on the left on the right. Is it possible to only set it for the right side?

@nuflowx
Copy link

nuflowx commented May 11, 2016

You can just set padding-left: 0 !important in your CSS file

@fcubria
Copy link

fcubria commented Mar 24, 2017

So anyone know if this is possible?
This is the case where this has sense: showing the user that there are more items without using prev and next buttons.
stagepaddingjustoneside
Thanks in advance.

@hellorich
Copy link

hellorich commented Apr 11, 2017

@fcubria This is exactly the implementation i'm trying to create - did you ever figure out a means of doing this?

Edit: I've managed to implement this by setting items: 1.25, and using CSS to add spacing between items.

@tungmv7
Copy link

tungmv7 commented Jul 23, 2017

Thanks @kevinmack18 Save my life!

@jhill-amaze
Copy link

@nuflowx I prefer your approach over @kevinmack18 because it avoids the need to keep two values in sync (css and js) instead of just one. Thanks!

@sushantvishwas1990
Copy link

@fcubria yes it is possible you have to use the stagePadding with .owl-stage css property for example:

<script type="text/javascript"> $('.your-selector').owlCarousel({ items:1, stagePadding: 100, margin:10, loop:true, nav:false, dots:true, }); </script>

<style> .owl-stage { left: -100px; } </style>

@Sv9t
Copy link

Sv9t commented Jul 2, 2019

@sushantvishwas1990 if I have 2 carousel in my page and I wont only 1 carousel left: -100px? What I do?

@Sv9t
Copy link

Sv9t commented Jul 2, 2019

@sushantvishwas1990 if I have 2 carousel in my page and I wont only 1 carousel left: -100px? What I do?

<script type="text/javascript"> $('.your-selector1').owlCarousel({ items:1, stagePadding: 100, margin:10, loop:true, nav:false, dots:true, }); $('.your-selector2').owlCarousel({ items:1,margin:10, loop:true, nav:false, dots:true, });</script>

<style>.your-selector1 .owl-stage { left: -100px; } </style>

@Ejilarasan
Copy link

On applying stagepadding with the left in negative works great. But, for the last item, it needs to be in the center while the loop: false. On loop: false, white space exists for the last item.

How can we fix this?

@ydang204
Copy link

ydang204 commented Aug 8, 2019

this can be fix by using 1.5 items but it can not swipe on mobile
any solution for this?

@ArunAnthony
Copy link

StepPadding leaves blank space on right side when the number of items are completed after using right : -10 px important

@murtazajafari
Copy link

I had the same issue, I resolved it by adding a negative right: of my stagePadding's value on .owl-stage class .
For example, stagePadding: 20:

.owl-stage {
    right: -10px;
}

Greate, thank you. It worked for me, made my day

@Rahulv2492
Copy link

I had the same issue, I resolved it by adding a negative right: of my stagePadding's value on .owl-stage class .
For example, stagePadding: 20:

.owl-stage {
    right: -10px;
}

.owl-stage {
padding-left: 0px !important;
}

padding-left to 0 fixed my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

16 participants