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

Unwanted white space before first slide #2176

Closed
DJviolin opened this issue Mar 2, 2016 · 7 comments
Closed

Unwanted white space before first slide #2176

DJviolin opened this issue Mar 2, 2016 · 7 comments

Comments

@DJviolin
Copy link

DJviolin commented Mar 2, 2016

I have unwanted white space before first slide. I turned off both Slick centerMode and infinite in the options for easier description of the problem. What I want is to set true both of these options, but my first slide needs to be absolutely left of the screen, not the last two slides.

https://jsfiddle.net/Lanti/1cytep27/10/

Steps to reproduce the problem

See attached jsFiddle.

What is the expected behaviour?

I want the first slide at the left of the screen both centerMode and infinite set to true.

What is observed behaviour?

The last two slides at the left of the screen. My first slide is the third when centerMode and infinite set to true. Can it be CSS issue in my stylesheet?

More Details

  • Which browsers/versions does it happen on?

Firefox latest

  • Which jQuery/Slick version are you using?

Jquery 2.2.0, Slick 1.5.9

  • Did this work before?

Untested, first implementation

  • See attached picture from my development site:

slick-error

@leggomuhgreggo
Copy link
Collaborator

Hey @DJviolin I'm gonna close this because it's a duplicate. If you search the repo for 'white space' you'll find a number of issues about it, and I think there's even a PR to fix it. Thanks!

@DJviolin
Copy link
Author

DJviolin commented Mar 2, 2016

Setting ˙slideToShow˙ bigger then the half of all slides not solving the issue:

https://jsfiddle.net/Lanti/1cytep27/12/

I have to turn off centerMode which I not want. Also requires infinite set to true otherwise last slide have big white space.

Alhough the slides not be centered, but at least infinite: true, centerMode: false fixes the "jumpy" behavier with swipeToSlide: true.

I think these issues related:

#877

#822

@leggomuhgreggo
Copy link
Collaborator

I think this is the most active one I've seen. But there're a bunch.

I think the centermode thing might be addressed by this PR

@engelfrost
Copy link
Contributor

@DJviolin I found this because it mentions my PR, but this is a better place for discussion. I think I understand what you mean - you want alignment to gradually shift from left-alignment of the leftmost slide to right-alignment of the rightmost slide. This is not what centerMode does - it places your image dead in the center, always. It sounds to me what you are requesting is not a fix, but a new feature.

@DJviolin
Copy link
Author

DJviolin commented Mar 7, 2016

Yeah, I think this is probably a new feature. It would be nice to see an option when you can align left your first slide in the slider, but keep centerMode on.

I like when you can center the slides, but I not want to show my last two slides on the frontpage. Usually when photographers creating their horizontal portfolios, their best work is at the front, and the worst is at the back. I building my photo portfolio with the same principles. Of course, you can re-arrange your first two slides at the bottom in the unordered list, but the problem with this, depending on the resolution and the aspect ratio, your very first image (which is at the second from the bottom in the unordered list) sometimes overlapping to the left side of the screen (which is your best photo work).

Hitting the next button should return slide 2-3 or 4 depending on which will be centered next in this case.

@dfhincapiem
Copy link

I had some problem with space before the first slide, and I had a footer of the image with an a tag link. I remove it and the white space was fixed

@thiagobrauer
Copy link

Take a look at this merge request, his solution worked for me.
#2635

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

5 participants