Solved

Relates to writing CSS media queries

Posted on 2014-11-23
1
148 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

746 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

14 Experts available now in Live!

Get 1:1 Help Now