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

Create a breakpoint for devices 480 pixels wide or larger. Inside the breakpoint, set the h1 font-size to 2.5em.

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

i dont know why it is giving me error.

I just asked the same question and listed the very same answer as you. Looking forward to an answer!

3 Answers

Just making an educated guess here, so I could be wrong!

However, my guess would be that you are placing the media query at the start of the CSS file and are running into some cascading issues. If you currently have the media query placed at the start of the css file, it is being overridden by the h1 ruleset further down in the stylesheet.

If the above is true, try moving your media query to the end of the stylesheet after the .contact-info a rule set and let us know if that fixes your issue.

Good shout, i didnt even think about cascading placement. nice one :)

You got it mate.i copied the media query at the bottom and it worked! Thanks

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

Hi Adeel,

This is strange, I'm not sure why this code should be giving you can error.

Could you give me a link to a code challenge or workspace you're trying to code with so we can debug? :) Thanks

Hi Jonathan,

check out the the code challenge link and see if you see the error which i cant see. Thanks =) https://teamtreehouse.com/library/how-to-make-a-website/responsive-web-design-and-testing/write-css-media-queries

Have you tried omitting the screen value, as with media queries, the default value is screen. not sure if it will work, but may be worth a shot.