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

Adaptive Layouts w/ Media Queries Code Challenge 3/3 Problem

I feel so certain that my code is correct, yet I keep getting the "Bummer!" message. Is there something I'm doing wrong here?

The challenge is, "Create a new media query that sets the width of '.wrap' to 980px if the viewport is 1000px or wider."

Here's my code:

  @media only screen and (min-width: 1000px) {
      .wrap {
          width: 980px;
      }
  }

Seems correct to me? And it also work when i did this;

@media only screen and (min-width: 1000px) {
    .wrap { width: 980px }
}

Just put the code in the end of the css file.

Ronnie is right. You have to put the code at the end of the file. I had the same thing happen to me.

5 Answers

Had a hard time with this also, ended up putting the code at the top of the file.

guys i'm having a similar issue it just won't validate my answer even though my code is:

@media only screen and (min-width: 1000px) { .wrap { width: 980px; } }

Seems like Treehouse is a bit buggy!

Thanks everyone for the answers!

Kris Reid
Kris Reid
17,429 Points

Having real issues with this task... I've got it exactly like the people above but it still says "Bummer! Did you specify the right width?" The values are correct however. Can someone check to see if there is a problem with the actual challenge??

EDIT: Never mind the closing curly brace above wasn't right it was a bracket - doh!

same problem...