Search code examples
mobileresponsive-design

Responsive web design is working on desktop but not on mobile device


I have a website which must be responsive for mobile phones. I've created it using my desktop. When I adjust browser windows it's working perfectly for mobile phone but when I check it on my real mobile phone: Samsung Galaxy S2 it's not responsive to the mobile view.

What could be the wrong?


Solution

  • You are probably missing the viewport meta tag in the html head:

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

    Without it the device assumes and sets the viewport to full size.

    More info here.