Solved

Question about the @media screen query

Posted on 2014-10-14
3
164 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks to both of you for your input. :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

772 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

10 Experts available now in Live!

Get 1:1 Help Now