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

CSS

Uploaded site but it is not responsive when checking on mobile devices

I uploaded my site and when checking it on the desktop it is responsive but when I check it on my phone it is not responsive. What could be the problem for this? Thanks in advance

4 Answers

I'm going to take a wild guess (from experience) that you never set your viewport.

Make sure this is between the <head></head> tags

<meta name="viewport" content="width=device-width, initial-scale=1">

Is there anyway that you could have set the width wrong in the media queries? Or are you using bootstrap or something similar to that?

I set it to 320px, 360px and 375px which should be fine for the iphone. It works when I reduce the width to these sizes on a desktop computer but when I checked it on my phone it only showed the full desktop version so I dont understand why this is happening as the media queries work on the desktop.

Thanks Kevin, that solved my problem.