You might want to see this...
I had an awful time trying to create a scrolling background – especially since it had to work across multiple screen sizes. If you look at that thread, you can see the problems and solutions discussed.
The end result is here...
It was extra tricky because the background uses an SVG image.
I basically scale the scene with JavaScript and I have a large element that's twice the size of the scene. The background image is shown once and repeated once. It scrolls edge-to-edge and then repeats. I stretch the background vertically to get rid of horizontal line. (For some reason, a seam would show up. I tried to get rid of it, but then just stretched the background vertically.)