Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Nicole Pelchat
Nicole Pelchat
590 Points

Why isn't my web page mobile responsive?

So I'm working through the Web Design track, and pretty much copied Nick Pettit's code line for line as we went through, just so that I would understand what we were doing and I would know that what I was doing was correct because it would look like his on the screen. My code did what it was supposed to do in workspaces, and I've transferred it over to my live site and while it looks fine on the desktop, the gallery is still showing as 3 columns on my iPhone.

My site is nicolepelchat.com and my workspace is https://w.trhou.se/urflxp3jgs

Alternately, is there a place where we can go in and view Nick's code for that site? So I can go line by line and figure out where I lost the plot?

2 Answers

Arturo Alviar
Arturo Alviar
15,739 Points

Hi Nicole,

I took a look at your code and it seems you are missing the meta viewport tag. This tag changes the viewport of the page to fit the device's viewport.

Here is how it looks

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

Add this to the head section and it should work.

You can read more about it at css-tricks

Hope this helps!

jason chan
jason chan
31,008 Points

Hey Nicole,

I'm using google chrome browser. Your website is responsive. Have you tried refreshing a few times or clearing your browser history?

You can also try different browser.

Nicole Pelchat
Nicole Pelchat
590 Points

Yeah, I've refreshed it about 300 times. It's responsive when I'm in a desktop browser and I'm dragging the window larger or smaller, but it's not responsive at all in Safari. I also have the firefox app on my iPhone and it's not responsive on that either.