Solved

Question about the @media screen query

Posted on 2014-10-14
3
176 Views
Last Modified: 2014-10-15
When you specify an orientation - as in the sample query below - what is that supposed to accomplish? Does it not even allow the webpage to load unless the device is held in landscape fashion? Or will it display in landscape only, even if held in portrait fashion? I'm just not sure what specifying the orientation is supposed to accomplish . . . and figured it would be easier to "ask the experts" rather than doing a bunch of testing. (I'm kind of a novice html and css guy . . . and have been "out of the loop" for a while when it comes to writing code.) Thanks!

/* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* Styles */
}
0
Comment
Question by:Thunderman54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 250 total points
ID: 40380983
The media query is for specifying additional css that should be applied when the device fits those specifications
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 250 total points
ID: 40382957
All the stylesheets are brought in at load without reference to the current device or UA so that they are available if needed.  If the user goes from portrait to landscape, then the media query causes the browser to switch to the specified styling which has already been loaded parsed and serialized in the Document object, provided that the browser, OS and device support the landscape qualifier; which may not always be the case.

Cd&
0
 

Author Closing Comment

by:Thunderman54
ID: 40383098
Thanks to both of you for your input. :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question