Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Susan Siow
6,497 PointsBackground Image Doesn't Fixed on Mobile Devices
I've forced the background image of the body this site to fixed but somehow some mobile devices don't follow the rule. Any tips?
4 Answers
Jeremy Germenis
29,854 PointsWhen you scroll a mobile page some devices are not actually scrolling they are "moving around" a sized version of the page. Support for fixed backgrounds are limited. You can try something like modernizr and make a css rule for browsers that support fixed backgrounds and another rule for those that do not.
Susan Siow
6,497 PointsWhat's the css rule like for a Wordpress site?
Susan Siow
6,497 PointsAdam Sackfield Hi Adam, please help check on iPad and share your view. Thanks and happy weekend!
Adam Sackfield
Courses Plus Student 19,663 PointsiPad Mini, background is not fixed (it scrolls off the screen)
Susan Siow
6,497 PointsThanks @adamsackfield, have you tried making the background fixed on an ios device?
I've tried forcing it with background-attachment: fixed !important; but it doesn't work.
Jeremy Germenis
29,854 PointsIf you haven't found a solution yet you can try wrapping the page in a div and adding scroll bars to it and removing the standard browser scroll bars with css.
Adam Sackfield
Courses Plus Student 19,663 PointsAdam Sackfield
Courses Plus Student 19,663 PointsThe grey swirly thing? It stays fixed on Chrome when minimized to mobile sizes, not tried on the iPad yet though as it's a challenge to get it off my girlfriend :)