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

HTML How to Make a Website Responsive Web Design and Testing Build a Three Column Layout

Carson Carbery
Carson Carbery
9,876 Points

My question is not about this video, but the code challenge before it. It says that my answer is incorrect!

Here is my answer... I can find nothing wrong with this. And the help in the code challenge is useless. I'm finding that the code challenges rather than enforcing the learning are inhibiting progress and causing confusion and frustration rather than learning! There should be the option to skip a challenge and return once the correction has been found, or to see the correct answer and return to repeat the code challenge. It should never put a hold on the lesson!

@media screen and (min-width: 480px) { /normal landscape size of phones/ h1 { font-size:2.5em; } }

here is my code and it's working fine

 @media(min-width:480px){
  h1{
    font-size:2.5em;
  }
}

6 Answers

Make sure you always place media queries at the bottom of the document and not toward the top.

@media screen and (min-width: 480px) { h1 { font-size: 2.5em; } }

I had the same issue when I tried this challenge lol! Turns out everything I wrote was dead-on but you must place the media query at the bottom of the page :) Hope this helps

Carson Carbery
Carson Carbery
9,876 Points

Thanks Dylan, that has indeed solved the issue.

Glad I could help haha! It helps me when I help others :)

Carson Carbery
Carson Carbery
9,876 Points

Thanks for the comment Suresh, however it still doesn't work when I try your code in the code challenge either.

Have you tried removing the comment? I believe that may be the issue. I'm assuming the challenge asks to change the h1 to 2.5em?

Carson Carbery
Carson Carbery
9,876 Points

Hi Benjamin, yes I removed the comment. However it is still not working

Can you screenshot the page with both the code challenge prompt and the code you used in it?

Make sure there isn't a semicolon after the 480px. Not sure why but it will count it wrong if the semicolon is there. I try to get screenshots of all the quizzes & challenges. There's not enough room on the page when you put the query all the way at the bottom. What I did was delete everything except the first 3 rules, and then entered the query at the bottom. I got it right, and I got my screenshot.