When on the iPhone I want the max-width query to take effect. However, the min-width query does instead! Help!

curtinj

02-19-2012, 01:57 AM

I just started using media queries, I'm only using max-width, maybe you can use max and min, but not sure. But I did find out through trial and error that order does matter. For example, I have:
@media screen and (max-width: 750) {
.....
}
@media screen and (max-width: 480) {
.....
}
Reversing it with 480 first caused problems.

CSSNoob7

02-19-2012, 02:35 PM

I just started using media queries, I'm only using max-width, maybe you can use max and min, but not sure. But I did find out through trial and error that order does matter. For example, I have:
@media screen and (max-width: 750) {
.....
}
@media screen and (max-width: 480) {
.....
}
Reversing it with 480 first caused problems.

Changing the two around made no difference - thanks for the suggestion though.