There is a site in which the fixed width for all screen sizes.

<div style=" height: 700px; width: 1349px; margin-right: auto; margin-left: auto;"> </div> <div style=" height: 700px; width: 1349px; margin-right: auto; margin-left: auto;"> </div> <div style=" height: 700px; width: 1349px; margin-right: auto; margin-left: auto;"> </div> 

When downloading a site on a mobile phone, the first thing it displays is not all, but I would like to see the full width of the site immediately when the page loads. enter image description here

  • Does it mean the scale is not the one at boot? Is it necessary for the site to fit the entire width of the screen? - Skywave
  • @Skywave Yes, you need to enter the address of the site, it opened at once, all wide, so that you need to look closer. And now only a slice of the site is opened when loading, you have to zoom out to figure out what's what. - Valery Emelyanov
  • See if there are meta tags like viewport. You must either change the width value or remove this tag altogether - Skywave
  • @Skywave Please tell me which files they usually live in - Valery Emelyanov
  • In the page header in the section <head> - Skywave

1 answer 1

The viewport meta tag is responsible for the viewport

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

You must either remove it from the <head> section or change it to the desired value.

  • Необходимо либо убрать его Can Необходимо либо убрать его be added and not removed? If you remove everything will be bad - MasterAlex
  • @MasterAlex I learned about scaling something like this myself recently, I also started using this tag recently, so I’ll definitely not say. But before I began to use it on sites, they scaled with me so that the whole site got into the screen - as the author required. - Skywave
  • As far as I know the mechanics of this line, it works just the opposite, without it, the site can crawl out of the device’s boundaries, and this line sets width=device-width, initial-scale=1.0 , and this means that the content width will be equal to the device width , and the scale of the display is 1 to 1. Otherwise, this line would not have received such popularity on sites, it is this one that allows you to get a digestible site view without optimizing for mobile. Based on what I have written, your proposal to remove this line will mislead users. - MasterAlex