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

HTML Build a Responsive Website Responsive Design Content Defined Breakpoints

Correcting challenge?

Trying to correct a challenge and not recognizing the issue. Please advise.

/* Smaller ----------- */
@media screen and (max-width : 705px) {

.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6, {
    width:100%;
}

This is from Build a Responsive Website. Writing a media query. The response was Did you set the width for the grids to 100%? Puzzled. Thanks for your help.

3 Answers

Neil Northrop
Neil Northrop
5,095 Points

Hey Paula,

Does having all the grid classes on one line help? And taking out the last comma after .grid_6?

/* Smaller ----------- */
@media screen and (max-width : 705px) {

.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 {
    width:100%;
}
}

Hi Neil,

That did it... I sort of understand the comma but any idea why having the grids all on one line when they didn't display it that way in the lesson?

Thanks for your help.

Paula

Neil Northrop
Neil Northrop
5,095 Points

Hi Paula,

To tell you the truth, I'm not too positive. It may have been the comma that was after the class grid_6. I also believe CSS needs to have all the selectors on one line to read it correctly. I know I've always written it that way but doesn't mean I'm right about it.