K
K
Kot Matpockuh2016-08-30 13:41:35
HTML
Kot Matpockuh, 2016-08-30 13:41:35

Mobile layout: layout & viewport, how to make friends?

Hello. I have a question...
There is a layout (mobile version design) with a width of 640px. I made up, of course, with min. the width of all blocks is 640px. But then there were "jokes" with some mobile devices on which the scroll appears - i.e. the page needs to be scaled.
I tried to play with the viewport (set initial-scale, width, etc.), but it turns out some kind of bylocode with ifs)
I'm probably doing something wrong.
How to initially fit the page to the scale of the device ?, even if its width is 540 pixels?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sergski, 2016-08-30
@sergski

For mobile versions, you can’t make a fixed layout, there are too many devices. Use min-width and/or max-width on the media, like so:
And in css use: min-width, max-width, width: auto
Media Queries

A
Alex Glebov, 2016-08-30
@SkiperX

I made up, of course, with min. the width of all blocks is 640px.

so what if the layout is 640
for phones 320, the minimum screen width is always taken ..

A
Alexander Alekseev, 2016-08-30
@shure348

set the viewport to 640px

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question