I am having a huge problem. In my stylesheet I have:

@media only screen and (min-width: 320px) and (max-width: 700px)
{
code1
}

@media only screen and (min-width: 1280px) and (max-width: 1400px)
{
code2
}

my browser window is currently 640x960, so only code1 should run... right? But code1 and code2 are both running. How do I change my media queries so that only code1 will run with my browser window at 640x960?

Are you sure you're not missing some closing parentheses in the first block? I don't see how both rules could apply when the second range is not reached by your resolution.

By the way, is this portrait oriented?

there was a stray bracket which I removed, but I am still having the same problem

I moved the media queries to another linked stylesheet and now neither of them are loading.

Could you paste the full stylesheet?

I got it. It was a wordpress site and I had deleted the wp_head() function. That function needs to be there in order for the stylesheets to be linked properly.

Ok, thanks for the update. Bye!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.