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 trialRoutine Poutine
26,050 Points@media (min-width), (max-width), or (min-width) and (max-width)?
Hi,
Are all three of these designations equally useful or do developers today prefer one over the others? I think I observe both a lot and can never tell if it's preference or circumstantial.
Best,
Matt
1 Answer
Jamie Reardon
Treehouse Project ReviewerFrom what I know so far while learning is that, taking the mobile first approach which is recommended, is that you would use the min-width feature since you are building the site upwards in terms of width.
You can combine conditions as well like below:
@media (min-width: 700px) and (max-width: 800px) {
}
You can also combine media rules together by comma separating them:
@media (min-width: 800px),
@media (orientation: landscape) {
}
Not sure if you know this already.