Because you are telling the viewport not to show anything beyond what it already is. In effect you are freezing the initial window...if it can't scroll the background doesn't need to move.
I have fixed the issue with some javascript, because the design I was given required me to use a bit of JS to work with the overflow of divs and elements.
I will see if I can set up a smaller test-case because I am very curious of this behavior.
If I set overflow-x:hidden on the body/html tags, my background image will not scroll, it acts as if it's fixed.
Can anyone explain why this happens??
Because you are telling the viewport not to show anything beyond what it already is. In effect you are freezing the initial window...if it can't scroll the background doesn't need to move.
So even if it's overflow-x:hidden, if you are still able to scroll vertically (y-axis), the background is told to stay put?
Weird, but thanks for the insight.
I didn't realise that your background extended downwards.
Do you have a link we can look at?
I have fixed the issue with some javascript, because the design I was given required me to use a bit of JS to work with the overflow of divs and elements.
I will see if I can set up a smaller test-case because I am very curious of this behavior.