Media Query for max width OR height

I’m trying to construct a media query which works when the view is less than a given size in either dimension, width or height, but I don’t know the correct syntax to do that, or if you can.
I know this (or) does not work, but an example of what I mean:-

@media screen and ((max-width: 500px) or (max-height: 500px)) {}

Something that does that, but works…

A comma is your savior :slight_smile: .

@media screen and (max-width: 500px) , screen and (max-height: 500px) {
 /*shiz*/
}
3 Likes

That’s perfect. Thanks Ryan. :smiley:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.