Solved

Using @media only screen query

Posted on 2014-10-20
2
163 Views
Last Modified: 2014-10-20
I want to create a simple webpage . . . a video player (responsive design) placed upon an attractive background image. For mobile devices and smaller screens (tablets) I plan on using a simple solid color or gradient background image. For larger displays, however, (probably 1440w and up) I would like to use an actual, attractive background image. I will then position the player in the lower right or left part of the page - or perhaps centered, depending on the image. My plan is to use the @media only screen query to do this, loading the appropriate bg image per screen size. Can I put all the queries in one external style sheet, and if so, must I list them in any particular order (i.e., smallest width res to the highest)?

Some related questions concerning this project (if you'd be so kind to share advice :) ). Can vector images be used for backgrounds in a web page? Are there any good sources for vector background images on the web? Is there an easier way to accomplish what I've described above? This project is mainly just to share family videos with a wide circle of friends and family. I've thought about just creating 3 separate web pages (small, medium, and large) and letting folks bookmark the one that works best for them based on the device they're using to view the videos. Any thoughts on that?
0
Comment
Question by:Thunderman54
2 Comments
 
LVL 52

Assisted Solution

by:Julian Hansen
Julian Hansen earned 250 total points
ID: 40391635
Can I put all the queries in one external style sheet,
Yes
must I list them in any particular order (i.e., smallest width res to the highest)
Smallest to highest is usually conventional for the reason that if you do it another way you will match a potential screen res lower than your max. In CSS last style wins so have the biggest one last to ensure you hit the right resolution for the right browser metrics.
Can vector images be used for backgrounds in a web page?
Check out this link for a discussion on how to do this
http://css-tricks.com/using-svg/
Is there an easier way to accomplish what I've described above?
Sounds like a pretty straight forward site - not sure what you mean by easier. For your background you can either go JPG/PNG which obviously has scaling issues. SVG might have a slightly longer load time (not always though) but scales perfectly.
0
 
LVL 58

Accepted Solution

by:
Gary earned 250 total points
ID: 40392479
Smallest to highest is usually conventional for the reason
That will depend on how you are writing your queries.

If you are using the max- directive then you go from highest to smallest
If you are using the min- directive then you go from smallest to highest

If you are using both max- and min- in the same query then it doesn't matter as only one query will (should) ever fire anyway)
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

Suggested Solutions

Title # Comments Views Activity
Re-imbursement Claim System 3 53
Do you know any Office editor web for IIS or Apache web server)??? 10 80
contractual requirements for app hosting 3 80
Animated .jpg? 13 61
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

920 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

17 Experts available now in Live!

Get 1:1 Help Now