CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.
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.
This reply has been reported for inappropriate content.
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 will see if I can set up a smaller test-case because I am very curious of this behavior.
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed