Solved

Using @media screen queries

Posted on 2014-10-10
1
179 Views
Last Modified: 2014-10-20
My question relates to using css @media screen queries. For example, I have a 10" tablet that shares the same default screen resolution as my large 22" desktop display monitor, That resolution is 1920 x 1080.  The webpage I've designed - which basically is just a video player laid on top of a background image - looks and functions great on my 22" desktop monitor, but not all that great on my 10" tablet. Well, technically I guess it looks okay, but the usability of the video player becomes a little more awkward on the tablet (touch instead of mouse). So . . . is there some way that I can still use the @media screen query (or some other media query) to load a different background image for the tablet? In other words, I'd like to write a style sheet that would style the page differently for these two devices, even though they share the same screen resolution. Is that possible? Is there a way, for instance, to specify diagonal screen size in addition to pixel resolution in a style sheet in order to make this happen? I've just recently been introduced to media queries, so . . . there may be a very simple way to accomplish this that I'm just not aware of. (??) Thanks!
0
Comment
Question by:Thunderman54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40373971
No, media queries are based on device width and height only and not the device type.
Depending on what type of device you want to detect you may get away with using js to change the background at the client side
http://www.abeautifulsite.net/detecting-mobile-devices-with-javascript/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

749 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