Vladyslav Afonin
Vladyslav Afonin

Reputation: 1

Problem with width in horizontal scrolltrigger

I have a problem in my code with container's width, when I scrolling. For example, I don't see my las item in the list. I can't understand why there is this problem. I use ScrollTrigger and GSAP for this horizontal scroll. Also active element is wrong, because I can't scroll to end of list

``https://codepen.io/afonin_vlad/pen/BadoYqM```

Upvotes: 0

Views: 429

Answers (1)

Erik
Erik

Reputation: 485

Your getMaxWidth() only adds the offsetWidth, but forgets to add the 30px margin-left.

Upvotes: 1

Related Questions