johnny04501
johnny04501

Reputation: 279

Cordova ipad app 100% height issue

I just made an ios app through cordova, iphone app looks fine because I am using always portrait mode for iphones but for ipads I am using always landscape mode with locked rotation. The problem is when I ma build an app and run it on my ipad the landscape works fine the rotation is locked but the main issue is that I have set 100% height on body, and somehow its not working on iPad landscape. Looks like that 100% doesnt detect landscape mode and automatically was set 1024px for height because if I am set 768px height for body in inspect then the whole app looks fine as should.

Any ideas what can be the issue there ?

Upvotes: 1

Views: 1243

Answers (1)

jcesarmobile
jcesarmobile

Reputation: 53301

Don't set width and height if you set the scale

From apple doc

You do not need to set every viewport property. If only a subset of the properties are set, then Safari on iOS infers the other values. For example, if you set the scale to 1.0, Safari assumes the width is device-width in portrait and device-height in landscape orientation.

Upvotes: 1

Related Questions