Solved

Question about the @media screen query

Posted on 2014-10-14
3
179 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hbo knew my windows software 4 89
Add a loading gif while php runs server side 15 96
What is the best SEO Web Analytics tool/program 3 58
change site header 8 31
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

739 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