How to make my mobile site automatically adjust the screen resolution?

I work on a mobile site, but when I browse the site on my phone, the website is automatically reduced to a very small font, and the user needs to enlarge it to read the text.

How can I automatically display it in the right size every time a user visits the site?

Here is my CSS:

.content {
width:auto;
height:auto;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#666666;
text-align:justify;
}

And my HTML:

<div class="content"> Hello
<div id="logo"><img src="banner.png" border="0"></div>
</div>

Despite my code, on Android and iPhone devices, the text looks very small. How to fix it?

+3
source share
1 answer

Try adding this to your <head>:

<meta name="viewport" content="width=device-width, user-scalable=yes">

user-scalable . false, .

+7

Source: https://habr.com/ru/post/1770071/


All Articles