Menu Close

How to use CSS media queries to select max-width OR max-height?

To use CSS media queries to select max-width OR max-height, we separate the queries by commas.

For instance, we write

@media screen and (max-width: 995px), screen and (max-height: 700px) {
  //...
}

to select screen sizes with max width 995px or max height 700px.

Posted in CSS