Solved

Relates to writing CSS media queries

Posted on 2014-11-23
1
153 Views
Last Modified: 2014-11-23
Okay smart guys (and that's intended to be a compliment, not a sarcastic remark), here we go. :)

I have a simple one page website I'm working on . . . basically a video player embedded on a page with some very basic content surrounding it (accept for small mobile devices . . . in which case I intend to load the video player only). I'm hoping to use a simple style sheet with 3 or 4 breaking points using the min or max device-width property. (And that get's confusing as well . . . whether to use the min or max prefix.)

Anyway, one thing that confuses me is the way iPad screen resolutions are listed online. Sometimes it's 1024 x 768, sometimes 768 x 1024. Which is truly the width and which is truly the height? Which also leads to another question. Particularly with tablets (and especially with my application and the pixel cutoff point I might use), when a user rotates a tablet from portrait mode to landscape mode, could the browser potentially load a totally different style sheet . . . if using the min and max device-width property? In other words, does the device width change when the user rotates the device from portrait mode to landscape and vise versa? I'm hoping not . . . because that would seem to make writing the style sheet a whole lot more complex.
0
Comment
Question by:Thunderman54
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40460708
Which is truly the width and which is truly the height
Both

To detect orientation and load relevant css use (along with any dimensions you are targetting).

@media (orientation:portrait) {
}

@media (orientation:landscape) {

}

Open in new window

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn how to count occurrences of each item in an array.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

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