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 CSS Layout Techniques Grid Layout Testing our Grid

VISHAL DEEPAK
VISHAL DEEPAK
3,272 Points

What is the purpose of specifing "@media (min-width: 1px) and (max-width: 767px) " In a mobile first approach?

Cant seem to understand the above statements

@media (min-width: 1px) and (max-width: 767px){
 //Code hidden for brevity 
}

In a mobile first approach? We need to give this? We could have directly written this without any media query

2 Answers

Jaime Rios
PLUS
Jaime Rios
Courses Plus Student 21,100 Points

I think you can omit that but it is better to add that piece of code as a fallback.

VISHAL DEEPAK
VISHAL DEEPAK
3,272 Points

Thankx for your reply, but i still dont get it

I think it is to prevent the container from collapsing