Search code examples
cssresponsive-designmedia-queries

Media queries not working in smartphone


I am having strange issue. I completed a website and was using screenfly from quirktools to see how it would appear on tablets and smartphones..... it look fine

When I viewed the site on a smart phone or tablet in real, it was showing the site in desktop version ... media queries are not working ... I tried chrome, firefox, opera all on my phone but non of them is showing my site in mobile version.

Friends can you tell me what can possible be wrong ?

I am using simple media queries in my css file


Solution

  • Did you set a meta tag for the viewport? Something like:

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