Solved

Using @media screen queries

Posted on 2014-10-10
1
177 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MVC and Angular 2 114
Getting attribute Values using xslt 4 54
How to write an English digest paper 6 72
What are the best practices for updating dead links to valid ones? 6 51
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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

856 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