A
A
Alexander Antonov2015-05-15 21:39:37
iPhone
Alexander Antonov, 2015-05-15 21:39:37

Why does layout spread on Iphone?

On a real fifth iphone, the layout looks like this:
7d66e0af4ca3455a96651e00d4b53a0e.jpg
And in emulation like this:
a49c09f0bca04f418e982898f85e726c.png
I don’t understand at all why and how to fix it? Has anyone experienced this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Goncharov, 2015-05-15
@undermuz

Check if the viewport meta tag is correct. Responsive should be like this:

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

D
Denis Ineshin, 2015-05-15
@IonDen

min-width will help you to limit the width of the blocks. But in fact, for small resolutions, you need to change the layout using media-queries:
https://developer.mozilla.org/en-US/docs/Web/Guide...
habrahabr.ru/post/119127
mediaqueri.es
+ note that you need to focus not on the real screen resolution, since on iPhones retina and you should read this cool guide: habrahabr.ru/post/237931

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question