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 trialAbigail Graber
Courses Plus Student 1,192 PointsResponsive Design: Code Challenge: Content Defined Breakpoints.
I'm having trouble figuring out the correct answer for this task:
Write a media query at 705px where the layout begins to break, that forces grid_1 through grid_6 to span 100% width of the container.
This is the error message I'm receiving:
"Bummer! Be sure to set the media query at 705px."
13 Answers
Greg Gardner
3,342 PointsI had it work for me with this:
@media screen and (max-width: 705px){ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width: 100%; } }
The issue I'm having is the challenge errors out every other time so if I make a mistake I have to start over.
Greg Gardner
3,342 Points@media screen and (max-width: 705px){
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6 {
width: 100%;
}
}
Jason Hess
4,789 PointsThanks for the help. I had declared all the correct classes for the grids, just left out the last 2 closing brackets after my width of 100%. It only tok me an hour to find this error. :-) as are most issues with HTML & CSS.
samiff
31,206 PointsRachel Hooper be careful with your spacing and it should work fine:
@mediascreen and(max-width:705px){
versus
@media screen and (max-width:705px){
James Barnett
39,199 PointsGreg - If you are having issues with a code challenge that is not behaving please email the support team at help@teamtreehouse.com
James Barnett
39,199 PointsAbigail -
Help Us ... Help You
Can you post the code you are using, remember to indent each line of code 4 spaces so it will show up correctly in the forum.
Also please, post a link to the code challenge you are having issues with and mention the step you are stuck on.
You might also be interested in our featured post on how to ask good question on the forum
Greg Gardner
3,342 Points@James I have sent about 15+ messages to you guys and still no resolution, I pretty much just have to hit Check Code 20+ times until it works.
samiff
31,206 PointsTo comment on the topic, where you place CSS rules is important. Rules always cascade, so placing rules at the top of the stylesheet isn't the same as placing them at the bottom. Not considering the cascade nature can lead to errors especially when you are using grid systems or CSS from another source.
John Glynn
8,239 PointsHi,
I'm having the same problem. I tried pasting that code in and I keep getting an error message.
samiff
31,206 PointsHey John, a common mistake that's made here is the placement of CSS rules. In this case, placing the CSS rule at the top of the stylesheet won't work, while placing it at the bottom will. If that's the issue your having now, it's important that you understand why.
Rachel Hooper
1,636 PointsI'm having trouble at this point too. Here is my code; @mediascreen and(max-width:705px){ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width:100%;} } The error I get is "Bummer! Did you set the width for grid_1 through grid_6 to 100%?" <p>Here is the link to the page <a href="http://teamtreehouse.com/library/content-defined-breakpoints"> example link</a>.</p>
Rachel Hooper
1,636 PointsThanks for the help Sam; unfortunately it does not seem to be doing the trick. What I have now: @media screen and(max-width:705px) { grid_1, grid_2, grid_3, grid_4, grid_5, grid_6 { width:100%;} } </div> </body> </html>
Error message is the same. Thanks in advance for your continued help :)
samiff
31,206 PointsRachel Hooper seems like you forgot the .
in front of the class names:
@media screen and (max-width:705px) {
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6 {
width:100%;
}
}
Jonathan Boos
3,564 PointsIs this issue still going on i see that the comments go back up 2-5 months ago but i have this issue now still..
@media screen and (max-width: 705px) { .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width: 100%; } }
and the error received is Bummer! Be sure to set the media query at 705px.