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 How to Make a Website Responsive Web Design and Testing Website Testing

Mark Christensen
Mark Christensen
8,654 Points

Mobile to desktop error

When I preview my website the mobile view is initially shown. Then when I click the ABOUT link & then go back to the PORTFOLIO link the desktop view is shown correctly. Any ideas why the desktop view doesn't come up initially?

3 Answers

TJ Egan
TJ Egan
14,420 Points

What did you set as your media queries? What did you place in your meta tags in the head section?

<meta name=viewport content="width=device-width, initial-scale=1">
Mark Christensen
Mark Christensen
8,654 Points

How can I post my code here? When I do it shows up blank? Sorry, this is my first question.

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

TJ Egan
TJ Egan
14,420 Points

Code Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.

        ```html
        <p>This is code!</p>
        ```
Mark Christensen
Mark Christensen
8,654 Points

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

Is your browser sized correctly? If your browser matches the dimensions of the mobile media query, its possible that you would see a mobile view. Try making your browser full screen and see if it happens again.

Let me know if this works :)

Mark Christensen
Mark Christensen
8,654 Points

Thanks for answering but it's already full screen.

Hmm... like TJ Egan said maybe check your meta tags? Otherwise you may need to paste your code or link to the workspace you are using :)