Solved

Can I use a * wild card in a media query?

Posted on 2015-01-01
2
181 Views
Last Modified: 2015-01-01
Well, I guess we'll see if there are any "true geeks" workin' the holidays. :)

I've developed a simple webpage. Basically it is a fixed bg image with a video player that you can scroll down to (which actually pulls it up to center over the bg image). On smaller devices (primarily smart phones), I only load the video player with a solid black bg - that is, no bg image.

I've used media queries to load appropriate bg images on different larger devices based on 3 different aspect ratios . . . the ones that seem to be the most common in "the computing world." (16:10, 16:9, and 4:3). My question is, can I use a "device-aspect-ratio: *" query to load a generic bg of some sort for all other aspect ratios?
Is that how I would express it, by just putting an * where I would normally put say 16/9 or whatever?
0
Comment
Question by:Thunderman54
2 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 40526593
Just specify a default background image before anything else in the "cascade".

Example:

body {
    background-image: url(...)
}


Then cover all the exceptions.
0
 

Author Comment

by:Thunderman54
ID: 40526639
Sounds good. I'll try that and get back with you. I'm getting ready to post another question maybe you can help me with. Has to do with Firefox (testing on Android tablet) not interpreting my stylesheet, media query or both.
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

This article discusses four methods for overlaying images in a container on a web page
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn how to count occurrences of each item in an array.

830 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