question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slick Slider not working in mobile

See original GitHub issue

I am currently using this on a theme for my shopify store: http://ourstorypaperco.com

It seems that when on mobile, the javascript for some reason will change the width to an insane number like 34000 px, which results in a blank image. The slider dots also disappear. I am not 100% sure what is going on.

Check out: http://ourstorypaperco.com/products/gray-chevron-modern-baby-book

This is the html that it changes it when its on a smaller screen, notice the width at 14350 px? <div class="product-single__photo-wrapper slick-slide slick-active" style="width: 14350px;" index="0"> <img class="product-single__photo" id="ProductPhotoImg" src="//cdn.shopify.com/s/files/1/0836/5807/products/download_grande.png?v=1432427889" data-mfp-src="//cdn.shopify.com/s/files/1/0836/5807/products/download_1024x1024.png?v=1432427889" alt="Gray Chevron Modern Baby Book"> </div>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:11

github_iconTop GitHub Comments

59reactions
guruwanabecommented, Nov 18, 2015

Solved! .slick-slider { display: table; table-layout: fixed; width: 100%; }

11reactions
MatthewCawleycommented, Apr 4, 2020

This is what fixed it for me:

.slick-slider {
	display: table !important;
	table-layout: fixed !important;
	width: 100% !important;
}

It wouldn’t work without the important.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slick slider mobile:first param not working (responsive not ...
The default setting works. It shows the dots and one slide for <= 767px . However, when I test on a iPad (768px...
Read more >
Slick slider not syncing on mobile but good in desktop
Hi,. We have this problem in mobile when we click on the actual slider, it won't show as the main picture however, the...
Read more >
Slick Slider is breaking mobile site - Animations & Interactions
Your main page looks “broken” on chrome inspector (mobile) - so maybe the issue not related to slick: Open the Chrome developer tools...
Read more >
Mobile Only Slick Slider - CodePen
Here is how you can enable slick slider only on mobile view....
Read more >
slick - the last carousel you'll ever need - Ken Wheeler
To fix it, I set the '.slick-slide' wrapper to 'display: block; float: left' - then set the element inside of the wrapper (in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found