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 CSS Layout CSS Media Queries Complex Media Queries

About the last quiz in media queries

I hace stuck in the last quiz and i cant finish the module. This is the question: "Create a media query that changes the background color of the header element to orchid only when the viewport is between 768 and 1024 pixels."

My answer : @media(min-width:768px)and(max-width:1024px) { header{ background-color:orchid; } } And they answer me back: "Bummer: Did you specify the correct background color?" What am i doing wrong? and i cant see it ?? Thank you guys!

3 Answers

Hoi Sevi,

You will need to put a space before and after the logical operator (and) for the query to work properly.

@media (min-width: 768px) and (max-width: 1024px) {
  header {
    background-color: orchid;
  }
}

Happy coding!

Yes thank you it worked!

No problem! :)

hello about quiz what is the problem ? /Users/admin/Desktop/Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2022-07-12 Π² 12.46.23.png