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
204,009 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