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 trialliamthornback2
9,618 PointsMedia query not working properly when I go into mobile mode in the Chrome dev tools
The navigation bar changes to the proper mobile layout (each link stacked on top of each other). But when I open up chrome dev tools and switch the view to mobile, the layout of the navigation bar looks the same (links all on the same line). Why is this? Is anyone having the same problem?
4 Answers
Brianna Roby
6,724 PointsCan you post your code so we can take a look and make some suggestions?
Brianna Roby
6,724 PointsMy thought is that you may have missed some type of punctuation or small error that a second set of eyes may have caught.
liamthornback2
9,618 PointsWell if no one else has reported the same problem that is the most likely possibility. Unfortunately I don't have access to my old code so if that's true I can't find out where I actually went wrong. Thanks for your time anyways.
Andrew Rusli
6,701 PointsI have the exact same problem now. It does not re-size responsively in my chrome dev tools. However when I resize my browser window (not in dev tools) it does re-size responsively and correctly. Very weird. Not sure why.
Andrew Rusli
6,701 PointsOkay I solved this by adding the following meta tag to the html: <meta name="viewport" content="width=device-width, initial-scale=1.0">
My newbie guess is this must be an old video and so it doesn't work properly with the current version of HTML without the meta tag. Also nobody commented on this for 2 years? Am I the only person still using treehouse?
ilovecode
8,071 PointsThank you Andrew, didn't think to check that! I also had the same problem. Maybe they must add a note to the video to add it to the HTML.
liamthornback2
9,618 Pointsliamthornback2
9,618 PointsI've already moved on so I've lost the previous workspace. I don't see why you would need my code given that I was working with the workspace for this video. I don't think I made any changes to the code in the workspace that didn't match the instructions given.