PHP Developers Network

Media query Help?
Page 1 of 1

Author:  Darrel [ Mon Dec 01, 2014 1:05 am ]
Post subject:  Media query Help?

I am trying to get my website to be responsive and I am testing it on the Ipad2 yet I can not get it to be responsive.

On my HTML and I added the meta name...

<meta name="viewport" content="width=device-width, initial-scale=1.0">

{background-color: red}

and in the CSS I have added the query...

@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)

{background-color: blue;}

So In theory, the ipad should display my background as blue which it does but so does my desktop. Why is my desktop (screensize 1280 x 800) change to background-color blue?


Author:  Celauran [ Mon Dec 01, 2014 8:46 am ]
Post subject:  Re: Media query Help?

Works fine for me. To what selector are you applying the red background?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group