I want to use AND condition in media query. I use the the following code, but it didn't works
@media screen and (max-width: 995px AND max-height: 700px) {
}
I want to use AND condition in media query. I use the the following code, but it didn't works
@media screen and (max-width: 995px AND max-height: 700px) {
}
It's missing close and open parenthesis before and after the Logical Operator
@media (max-width: 995px) and (max-height: 700px) { ... }
The correct and simpliest way to write this is:
@media screen and (max-width: 995px) and (max-height: 700px) {
}
Use a comma to specify two (or more) different rules:
@media screen and (max-width: 995px) , screen and (max-height: 700px) {
...
}
From https://developer.mozilla.org/en/CSS/Media_queries/
...In addition, you can combine multiple media queries in a comma-separated list; if any of the media queries in the list is true, the associated style sheet is applied. This is the equivalent of a logical "or" operation.