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
Solved

Using @media only screen query

Posted on 2014-10-20
2
174 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 55

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
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.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

766 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