Solved

Using @media only screen query

Posted on 2014-10-20
2
190 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
[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
2 Comments
 
LVL 58

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

Independent Software Vendors: 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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

635 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