S
S
SilentImp2011-09-24 18:51:13
iPhone
SilentImp, 2011-09-24 18:51:13

How to limit page to iphone/ipad viewport?

Problem:
It is necessary that the page is limited to the working area of ​​the screen on the iphone.

In spite of

<meta name="viewport" 
content="width=device-width,initial-scale=1,user-scalable=no" />

and

html,body{
  width:100%;
  height:100%;
  overflow:hidden;
  }


Everything will scroll and initially in the viewport not all, but only part of the page. Testcase websaints.net/testcase/menu.html



Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vadim Makeev, 2011-09-24
@pepelsbey

Instead of device-width, write the specific number that you want to see. Then it won't scroll like here: pepelsbey.github.com/shower/en.htm?full#Cover

V
Vadim Makeev, 2011-09-24
@pepelsbey

And since the booze has gone: why do you collect styles (media queries) right in the header of the document, if this can be done with the same success in CSS?

S
SilentImp, 2011-09-24
@SilentImp

All figured out.
It was necessary />
Specify the maximum scale;

S
SilentImp, 2011-09-24
@SilentImp

And, yes, Q&A has a poor commenting system. :(

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question