Hello! There was a question with colleagues that we can not solve. It is known that when creating a mobile application you need to use

name="viewport" content="width=device-width" 

but then a question arose. for example, you can set the content value and be fixed, say 640 pixels and everything scales depending on the screen, or leave width=device-width and make a rubber layout ??

Please tell me how to do better!

thank!

    1 answer 1

    <meta name = "viewport" content = 'width = 640'> - for a fixed width site

    <meta name = "viewport" content = "width = device-width, initial-scale = 1.0, maximum-scale = 1" /> is for the adaptive site

    My opinion is better to impose immediately adaptive

    • And if this is not a responsive site, but a mobile application - in terms of output for an android, for example, it will simply be .apk - does it have a difference? <meta name = "viewport" content = 'width = 640'> in theory, is it just scaling? And it will be under the same smartphones of 320 pixels width - everything is also proportionally reduced? - ennet
    • no not in proportion - a scroll bar appears (if the site width is fixed) - soledar10
    • just tried with a fixed width of 640 pixels to open on a smartphone with a resolution of 320 - there is no band, everything was scaled. That's the question - why pay more, if it’s already ok - ennet
    • "maximum-scale = 1" is almost always evil. - Qwertiy