Search code examples
htmlcssmobileviewport

Viewport does not work


I'm trying to scale my website correctly on mobile, however when I use the viewport meta tag it does nothing.

My design is around 500px wide (and I do not want it to scale down, so I would like the website to "zoom" out until the whole design fits the page if the users width is below 500px) so optimally I would want to do something like this:

<meta name="viewport" content="width=500">

or:

<meta name="viewport" content="width=device-width; height=device-height" />

Even when I try to change the values nothing happens, like it's not working at all.

What can I do?


Solution

  • If I understand you correctly, you want the page to be zoomed to the viewport and not be responsive (i.e. look the same as on a larger device, but displayed smaller). In this case, just remove all viewport meta tags - mobile devices will do the zooming automatically.