I want to display the same set of CSS styles to people printing the page (media=print) and people browsing on a mobile phone. Is there a way I can combine CSS media queries?
Something like
@media only print or @media only screen and (max-device-width: 480px) {
#container {
width: 480px;
}
}
From https://developer.mozilla.org/en/CSS/Media_queries
You just have to remove the second
@media
and add some brackets.Separate them with a comma:
See the spec, in particular, example VI (emphasis added):
I doubt that the second
only
is needed, so you can probably do: