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 Write CSS Media Queries

Creating a breakpoint for devices with 480px width. Code is not working

am I missing an element in my code to get this to work? It is still asking me to change the font-size to 2.5em's

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

hey, you're so close. You need to use (min-width:480px) because it's for devices 480px and larger. So the minimum width needs to be 480px.

2 Answers

The question asks you to set the breakpoint to make the font size 2.5em for devices 480px and larger. Your code has it set to 480px and smaller. Just change max-width to min-width to get the correct answer. Otherwise your code is correct.

Thanks so much!

The challenge is asking you to

Create a breakpoint for devices 480 pixels wide or larger


You are making a breakpoint for devices smaller than that. change max-width to min-width and it should work

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

Thanks a ton for this! was driving me crazy!