Solved

Relates to media queries

Posted on 2014-11-25
1
122 Views
Last Modified: 2014-11-25
This relates to a previous question I asked . . . which I probably closed prematurely . . . answered by Gary (ID: 28567880). I hope to have some time to do some testing on my own over the holidays, but for now I'm just trying to get some "pre-testing" feedback that might help me. Thanks!

Let's say I have a media screen query that specifies that any device with a screen size of 800px width or less loads a black background, and anything over that width gets a white background. I have not made any specifications in my css as regards to orientation. Now, lets say I'm testing with an iPad which has a 768 x 1024 display. When I'm holding it in portrait mode it will load the black background, but when I rotate it to landscape it will load the white background. Is that correct? Is that what should happen? Does rotating the device force a browser refresh and hence load the style for the wider display (1024px)?  Or . . . does this only happen if you specify orientation in the css . . . in which case it would seem that an iPad (and many other phones and tablets) must have a default width and height specification. Still kind of confusing to me.
0
Comment
Question by:Thunderman54
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40465305
It doesn't reload the browser, the applicable css is applied.
So changing the orientation will just change the background color and thats it (like magic)
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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
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.
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…

822 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