# Tutorial | Smooth Parallax Scrolling

**URL:** <https://forum.kirupa.com/t/tutorial-smooth-parallax-scrolling/331835>\
**Category:** web dev\
**Created:** [November 5, 2013, 9:21am UTC](https://forum.kirupa.com/t/tutorial-smooth-parallax-scrolling/331835 "2013-11-05T09:21:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asparagus](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Asparagus](https://forum.kirupa.com/u/Asparagus)\
**Post date:** [November 5, 2013, 9:21am UTC](https://forum.kirupa.com/t/tutorial-smooth-parallax-scrolling/331835/1 "2013-11-05T09:21:27Z")

</div>

Howdy all Kirupa’ians, it’s been many a year since my last post on these forums. And I just noticed I first joined in 2004! How time flies. OK, on with business.

> **[Smooth Parallax Scrolling](https://www.kirupa.com/html5/smooth_parallax_scrolling.htm)**
>
> Learn how to create a sweet, high-performance parallax scrolling effect that JUST WORKS!

Long story short…

I fiddled with the code a little so it now scrolls horizontally. I’ve also removed the _ **blurry\_bg.jpg** _ image from inside the _ **parallaxContainer** _ and added my own image as a CSS background. My content is responsive, so the width of site and the _ **parallaxContainer** _ are dependent on the browser dimensions. My content is 6 times the screen width. This is all fine. Here’s the problem…

If I try and make the _ **parallaxContainer** _ any smaller than 4 times the screen width (so the parallax is slower than the content), it doesn’t scroll all the way to the right. 4 times is fine, it starts on the left and ends on the right, perfect. But 3 times or less (which would give a better parallax effect), you can see it end half way through the site.

I’m a javascript beginner, so I’ve looked through the code to see where it could be going wrong, but I’m stumped. I know not having a live version for you to have a look at makes things difficult, but any advice on what you think it might be would be greatly appreciated.
