Height of the iPad Safari viewport
34,953
Below are the answers;
You are right. The default viewport on both iPhone/iPad is 980px. There is no default viewport height, as such. You can change the width/height using;
<meta name="viewport" content="width=device-width, height=device-height" >
I could not quite understand the question. But yes, since the iPad resolution is 1024x768px, So in landscape mode, the height should be around 768px (minus the address bar height which should be around 40px or so)
The way most browsers work is they allow to set the width and height is adjusted accordingly (based on other factors including initial zoom level as well). So you need to work with setting width most of the times.
Author by
Nrc
Updated on July 09, 2022Comments
-
Nrc almost 2 years
- The viewport of the iPad is 980 pixels wide. What's the height?
- In Safari we must add the address and the new taps. What is the height Safari in landscape mode?
- There is a media query to fit the web to the width - is there a way to fit the web to the height?
-
Chris Wagner over 12 yearsThere is more than the address bar to account for, you have the status bar (20px) plus the chrome that Safari brings along which is variable, in iOS4/5 the user can turn on or off the bookmark bar which appears to be about 30px tall, then there is the address bar which is probably about 40-50px tall. Then in iOS5 there is the tab-bar, which appears to be another 30px. I measured the chrome on iOS5 with bookmark bar and tabs and it is ~125px, so your viewport is about 643 pixels high in landscape mode.
-
copenndthagen over 12 yearsYes right...So there is no direct way of determining the exact available viewport height...
-
Chad W about 12 yearsYou can get a pretty good set of dimensions by visiting whatsmy.browsersize.com. When I visit that site on my iPad in Safari, it tells me the browser is 981px X 644px.
-
Tom about 10 yearsThis seems to say that the browser always thinks it's in portrait model