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 Responsive Layouts Media Queries Media Query Review

why apply both min-width and orientation layout when they’re basically the sanme?

If he can hit the landscape layout by applying (min-width:700px), then why is it necessary to also apply (orientation: layout) ???

2 Answers

Steven Parker
Steven Parker
231,269 Points

Sometimes the width is all you need; but in the video example the "wide" layout is desired both on larger widths and on slightly smaller widths but only if the screen is wider than it is tall. That's where the "orientation: landscape" test comes in (note: "landscape", not "layout").

Note that the orientation test by itself does not imply any particular width, so the tests are not the same; though they might appear to be on just one particular device.

so orientation:landscape is applied to screen which is wider than it is tall (even if it's not exactly 770px)... Got ya. Thanks so much :D