Slick track width calculating width to large number

See original GitHub issue

Has anyone run into this issue and know how to resolve it? I am seeing slick-track’s width being calculated incorrectly to a very large number on mobile devices (ios chrome and safari, haven’t tested android). The width is correct on desktop chrome, firefox, edge, ie11…

Capture

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:35
  • Comments:16

github_iconTop GitHub Comments

40reactions
camilocagdcommented, Feb 14, 2020

@neomaxzero we used the following attributes in the container:

max-width: 100vw; width: 100%;

Good luck!!!

25reactions
conary-hcommented, Jul 4, 2020

@HZooly thank you! This worked for me:

.slider-container {
    max-width: 100vw;
    width: 100%;
    overflow: hidden;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Slick slider gets wrong width - Stack Overflow
Save this question. Show activity on this post. My slick slider gets wrong width when initialized and when I change screen resolutions.
Read more >
slick-track width calculation - JSFiddle - Code Playground
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Read more >
Developers - Slick track width calculating width to large number -
Has anyone run into this issue and know how to resolve it? I am seeing slick-track 's width being calculated incorrectly to a...
Read more >
Slick Slider with auto width - CodePen
http://kenwheeler.github.io/slick/ Forked from [Josh Adamous](http://codepen.io/joshadamous/)'s Pen [Slick Slider](http://codepen.io/joshadamous/pen/m...
Read more >
kenwheeler/slick - Gitter
.slick-track and .slick-slide have width:0 set to them ... or tapping the prev/next causes the slider to work, but initially it's just displays...
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