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

Mobile First

So I started designing a site(first site EVER) with the browser window 400px(w) x 388px(h) and didn't use media queries until I started designing for a bigger screen(700px). So my question is: Do I have to define a media query at the very begining or do I have to start a new media query that targets smaller devices? Or am I fine with just leaving it the way it is without using a media query at the very beginning, because I did start at the browser width of 400px.

This question might not make sense to all....any advice is welcomed. Thanks!

1 Answer

Hi Carl,

since you've started with a mobile first approach you don't need media queries until you start styling for larger screen.

For better understanding the media queries you're going to use will be with the attribute min-width like this:

yourAwesome.css
@media screen and (min-width: 768px) {
  /* your style for screen larger than 768px */
}

Okay cool thanks! Glad thats the case. Mobile first is def the way to go!