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 Basics CSS Layout Project Introducing the Project

Why do I only create two media queries, as opposed to adding a separate one for mobile devices?

.

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Amandeep Pasricha ! The "mobile first" approach may seem a little counter-intuitive at first because we do development on computers, right? As late as around 2010 most web browsing was still done on desktops (though I need a more credible source on that). Today over 75% of web browsing happens on mobile devices. What this means is that we used to always assume that the CSS would be displayed on a desktop by default. Today, we assume that it will be displayed on a mobile device by default.

This means that your base CSS should be designed for a mobile phone while your media queries should handle the outliers which in this day and age, are tablets and desktops :smiley:

Hope this helps! :sparkles:

.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Amandeep Pasricha Yup! Sorry. Just got the notification of your response. It's assumed that the main portion of your CSS is designed for mobile :smiley: