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 trialJulian McNeill
9,445 PointsHELP! white space on the right side of my mobile website
I go on my mobile website (http://julianmcneilldesigns.com) and there is white space on the right side of my site. After combing through my code a couple times I'm still confused as to why this is happening. if any one could help point me in the right direction that would be great
2 Answers
Matt Campbell
9,767 PointsYou've either got something outside of the container the backgrounds are applied to, so it's making it's own space etc, or the CSS isn't quite right. When I resize my browser to mobile resolution, it's fine.
Doesn't do it in portrait either.
Check the meta for the differing viewports and the CSS.
Julian McNeill
9,445 PointsThanks I'll look into that but I also just found a resolution by using overflow-x: hidden on the main wrapper div.
Matt Campbell
9,767 PointsIt wierd. When you first load the page, it's fine and everything but content is off center and cut off. But, you can zoom out and then the white space appears.
This suggests to me that it is the content causing the issue. Try reducing the width of it to test for a solution.
Julian McNeill
9,445 Pointsare you looking at the site on an iphone? thats weird because it wont zoom at all on my phone
Matt Campbell
9,767 Pointsyeah I was. It's normal on first arrival but then you can zoom out and the white space is there. Only happens in portrait though, if I recall correctly.
Alisher Musurmonov
Courses Plus Student 8,737 PointsUse html, body{overflow-x: hidden;}
Justin Thorson
1,595 PointsJustin Thorson
1,595 PointsNot sure, but I like the website.