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 trialLi Xia
4,671 PointsMedia queries and break points
Having trouble with this code challenge http://teamtreehouse.com/library/content-defined-breakpoints
Here's my code and it works, what can i do to pass the challenge?
@media screen (max-width: 705px) { .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width: 100%; } }
3 Answers
Elliott Frazier
Courses Plus Student 9,647 PointsYou need to add 'and' between 'screen' and '(max-width: 750px)' like this:
@media screen and (max-width: 705px) {
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 {
width: 100%;
}
}
gopinath para
2,880 PointsHai Xia,
Make sure that you are using "only" , "and" at proper places in code.
Cheers
James Barnett
39,199 PointsI removed your code, because here on the forum we try not to just give away the answers to the Treehouse code challenges.
Remember, the purpose of this forum is to help users learn how to troubleshoot their own issues. So rather than give someone the correct code, we usually prefer to stick with explanations and hints.
Try instead, explaining briefly why their code doesn't work and giving a small hint as to how they can fix it.
gopinath para
2,880 PointsMy bad.i forgot to think about that. i changed my replay . Hope that should be the right way of a reply for code challenge questions :)
James Barnett
39,199 Pointsgopinath para - That certainly gives the original poster a hint on how to fix it. But it doesn't point them in the right direction on what their original mistake was. I usually start with something along the lines of, how does their code not conform to the rules of syntax.
Li Xia
4,671 Pointsthanks guys.