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!
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
derekverrilli
8,841 PointsHow do I stop a site from getting pushed to the left when viewed on a phone?
I have noticed that even when using the meta viewport tag/attribute, on my phone the site is able to be pushed over to the left exposing whitespace from the right side. I thought I was doing something wrong but noticed it happens on the jQuery Mobile site (just to use as an example): http://jquerymobile.com/
In landscape mode it fills the viewport and doesn't move but in portrait I'm able to drag the whole page over to the left exposing whitespace.
Is there a way to stop that?
2 Answers

Julian Gutierrez
19,201 PointsCheck for any elements breaking out of your containing div, or wrapper. On the jQuery Mobile site the "ThemeRoller" image and a tag are breaking out of its parent.

derekverrilli
8,841 PointsThank you
derekverrilli
8,841 Pointsderekverrilli
8,841 PointsOh I see, perfect, thank you!
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsAlso check out the width of the element too. I see some sites that their ads are wide and it just pushes it everywhere. Bad sites : p