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 trialSevi Klein
5,281 PointsAbout 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
Mace β¨ π³π±
3,095 PointsHoi 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!
Sevi Klein
5,281 PointsYes thank you it worked!
Mace β¨ π³π±
3,095 PointsNo problem! :)
Andrei Kosin
403 Pointshello about quiz what is the problem ? /Users/admin/Desktop/Π‘Π½ΠΈΠΌΠΎΠΊ ΡΠΊΡΠ°Π½Π° 2022-07-12 Π² 12.46.23.png