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

Code Challenge: Create a new media query that sets the width of .wrap to 980px if the viewport is 1000px or wider.

I swear I've got this right, but it's not working!?

"Bummer! Did you specify the right width?"

Here's what I have written as my new media query:

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

Can anyone tell me what I've done wrong?

7 Answers

It was a bug. Thanks everyone for helping out. =)

I was missing a closing curly brace "}" above the last media query. Check your curly braces, I hope that helps!

Tim Knight
Tim Knight
28,888 Points

Jack, the code itself is right and seems to be working just fine for me.

Andreaus Perkins
Andreaus Perkins
14,402 Points

Try it without the the word "only".

James Barnett
James Barnett
39,199 Points

I should work with the only keyword. It appears that the code challenge correctness check is overly strict here.

In other words, looks like a bug to me.

Tim Knight
Tim Knight
28,888 Points

That's true, you could actually take out "only screen and" and just have...

@media (min-width: 1000px) { .wrap { width: 980px; } }
Lindsay Terrell
Lindsay Terrell
9,888 Points

Was this bug fixed? It seems I am having the same problem.

I am having the same issue, same exact code. Is this still a bug?