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

CSS

Sergi Beltran
Sergi Beltran
18,493 Points

Write a media query at 705px where the layout begins to break, that forces grid_1 through grid_6 to span 100% width

Hi everybody, I'm trying to pass this objective but I don't know why I can't. I've tried these options, but are wrong.

Can somebody help me?

Thank you very much.

( CSS --> Build a Responsive Website --> Statge 4 Responsive Design --> Content defined breakpoints )

@media all (max-width: 705px){
 .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 {  width: 100%;  }
}

/*** another option ***/

@media all (min-width: 705px){
 .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6 { width: 100%;  }
}       

You are very, very close. Please see my comment below. Cheers, Carsten

1 Answer

Hi Sergi, you've missed the "and" between all and (max-width: 705px) {}, Should be:

@media all and (max-width: 705px) {
  .grid_1, 
  .grid_2, 
  .grid_3, 
  .grid_4, 
  .grid_5, 
  .grid_6 {  
    width: 100%; } 
} 

Hope this helps. Cheers, Carsten

Sergi Beltran
Sergi Beltran
18,493 Points

Hi Carsten, thank you very much for you help. Yes, I was very close!

I had to write .container .grid_1 to solve the problem.