Solved

Using @media only screen query

Posted on 2014-10-20
2
157 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 51

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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

15 Experts available now in Live!

Get 1:1 Help Now