Solved

Question about the @media screen query

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now