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
Mamal Khan
14,206 PointsA problem on handheld devices
Hi
I've designed a launch page for a client maktab-ez.com and there is a problem.
When I watch it over tablets/smartphones, the background doesn't appear unless you zoom in to the page and then zoom out.
Is there any solution for this?
5 Answers
Gary Mann
8,639 PointsAs far as I can tell,
background-position: fixed;
is buggy at best on mobile browsers. Check this out:
http://www.quirksmode.org/css/css2/mobile.html
This blog post tries to explain it and explains a fix you can try: http://catch404.net/2012/12/fixed-backgrounds-on-the-bad-that-is-all-mobile-browsers/
I found some other possible fixes, mostly from stackoverflow posts, by googling something like: "background image problem tablets phones"
Gary Mann
8,639 PointsThat quirksmode blog is pretty awesome. Found this:
http://www.quirksmode.org/blog/archives/2012/10/budding_consens.html http://www.quirksmode.org/blog/archives/2013/12/position_fixed_1.html
Gary Mann
8,639 PointsCan you post the code you're using for your background image?
We can look at your source code but can't tell if you've made changes or found your solution.
Mamal Khan
14,206 Pointsthere was no changes...
Mamal Khan
14,206 PointsThanks a lot, and I think I have a solution for this...
getting the size of the page with js and adding it to a normal sized div with dot class.
I'll try it first thing tomorrow.