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 trialHenrique Vieira
5,003 PointsProblem with media query
The first curly brace after the media query is highlighted in red, which from what I understand means that it's not closed. Except that it is. I don't know what's causing this, as it only happens with media queries and not with any other curly brace anywhere on the code. min-width is also highlighted in red and the media query doesn't work on the live preview.
@media (min-width: 769px) {
.wrap {
min-height: calc(100vh - 89px);
}
.container {
width: 80%;
max-width: 1150px;
margin: 0 auto;
}
}
EDIT: The code works just fine if I download the files and open index.html. Maybe it's a worspace bug?
2 Answers
Rich Donnellan
Treehouse Moderator 27,696 PointsLooks like a bug. It's definitely misleading, but the code provided is perfect.
I've alerted the TH team. Thanks for posting!
Aaron Loften
12,864 PointsI think the editor just....does that.
My editors have always done this as well. I think it is a problem with the parser which is looking for characters like "{" and "}"
I went ahead and used your css on a jsfiddle to see if it was flawed and it worked. Just in-case it was a height issue, I went ahead and added a background color....