Slick: Insane page width

Created on 14 Oct 2016  路  8Comments  路  Source: kenwheeler/slick

The carousel works great, except for when I enter my responsive view (<719px). The page gets a random and insane page width (e.g. 30,000 or 354,873 px). As a result my images get the same width (and height...). Any suggestions?

Sorry, I don't have a link to my website or jsfiddle right now since I'm still developing on my localhost.

Doesn't follow Issue Template Needs Fiddle Not A Bug ) x Question / Support

Most helpful comment

@eaglejohn try something like max-width: 100vw;

All 8 comments

Hey, @eaglejohn, you can fork the fiddle in the contribution guidelines. Reduced test cases are pretty crucial, because so often environmental errors are the cause of issues, and the process of recreating them in a reduced environment often reveals the underlying issue. Also it's good form, because it makes debugging easier for people on whom you call for help.

For your issue, I wonder if there's a responsive setting that is errorring out when being applied. In cases like that the console will generally help. Might check the docs to make sure the value types are correct for your settings. If you think you might be doing something elaborate, it's possible that support isn't there yet. If you get a hint of the issue, often times there are existing ones either in this repo, or on sites like StackOverflow, that can help you.

Hope that helps.

Reduced test case

I ran into this exact issue yesterday. The weird thing is I implemented the carousel in a rails project for a client without any trouble, and then 8 hours later ran into this issue on a personal site. I'm using bootstrap 4 on both projects.

I haven't spent much time debugging yet, but if I figure out what's going on I'll post it here.

Any news on this one? I need to deliver the website to my client. I'll pick another carousel if you need more time to look into this issue.

@chasemcaleese Are you still having the same issue? Can you provide a link or fiddle?

@eaglejohn I confirmed this wasn't an issue with slick in my case. I substituted in another slider and had the same problem.

The way I fixed it was by making sure the slider was contained by a div that has max-width set to a reasonable number. Hope that helps!

@chasemcaleese I guess that's a max-width in pixels? I have this issue on the responsive view where the width is flexible (100%). Setting the container to width: 100% or max-width: 100% doesn't work. Only a fixed width in pixels...

@eaglejohn try something like max-width: 100vw;

@chasemcaleese Thanks, seems like that's working!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremymandel picture jeremymandel  路  3Comments

jamesinealing picture jamesinealing  路  3Comments

crstauf picture crstauf  路  3Comments

eirikrlee picture eirikrlee  路  3Comments

stephane-r picture stephane-r  路  3Comments