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

Rafael Sanchez
Rafael Sanchez
11,804 Points

Create a breakpoint for devices 480 pixels wide or larger. Inside the breakpoint, set the body background to the color n

navy.....this is the code I wrote @media screen and (min-width 480px){ body{ background: navy; }

Will Macleod
Will Macleod
Courses Plus Student 18,780 Points
@media screen and (min-width: 480px;) {
  body { background: navy;
  }
}

Hi I am having trouble getting through this code challenge with this code I have now, I cant see a problem can anyone help?

Lush Sleutsky
Lush Sleutsky
14,044 Points

Will Macleod

@media screen and (min-width: 480px) {
    body {
      background: navy;
    }
}

You do not need a semicolon after 480px - remove it and all will be well

3 Answers

Maximilian Stöhr
Maximilian Stöhr
7,479 Points

@media screen and (min-width: 480px){ body{ background: navy; } }

Try this, hopefully it will work :)

Adama Sy
Adama Sy
7,076 Points

I will break it for you, you were very close to get it done brother. In your normal css you will write to change you background color of the body tag;

Body { background: navy; }

now you have to do the same but inside your query at a certain witdth. so you set the width of the phone : @media screen and (min-width: 480px){

}

but you have to set the body background inside the phone not inside the computer or the tablet.

so

@media screen and (min-width: 480px){

body { background: navy; }

}

Lush Sleutsky
Lush Sleutsky
14,044 Points

You're missing a closing } to close the media query and that is all.

@media screen and (min-width: 480px) {
    body {
      background: navy;
    }
}