The front end and responsive design of following page is working properly in all mobile browsers except iPhone 7 and iPad 7.
http://tinglabs.in/chennai/tingau/index-ios-resp.html
I have tried scaling it properly through the following meta tags but it still doesn't work
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="initial-scale=1.0">
Am I overlooking something?
you can try to use this
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0">
Related
Our team use PWA for our website and I have an issue with status bar color on iPhone X.
Here is my index.html meta tags:
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="transparent">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, viewport-fit=cover">
Changing status bar content doesn't help:
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
I was looking for solution but I haven't found it yet. For comparing I've attached two screens from Xcode simulators with iPhone X and iPhone XS based on iOS 12.1:
https://i.stack.imgur.com/HB5ji.png
on iPhone XS it works like a charm
Since black-translucent fills the status bar area with the background-color of the app's body tag, like padding, I'd play around with the size, background-color and position of they body element.
On my webpage I have:
<meta content="width=device-width, initial-scale=0.80, maximum-scale=0.80, user-scalable=no" name="viewport">
This works fine for everything I've tested including safari on a iPhone but it refuses to scale to anything less then 1.0 inside of a webview in a iOS app.
Ideas?
I found a solution:
[_mywebview setScalesPageToFit:true];
fixes it for some reason.
Problem Demo
The problem is visible on IOS device (tested on iPhone 5). When viewing the page in landscape mode and switching to portrait mode, white space on the right side of the page shows up.It should be connected with mobile browser that is supported by iOS devices (Safari).
I tested on Xperia V for example and this problem is not there. Do you have any suggestions on how could i fix this issue?
The template is build on bootstrap and uses owl carousel in the slider. Any help would be appreciated!
add this to your head section:
<meta name="viewport" content="width=device-width, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" />
i had a similar issue with a kindle and this helped me out... hope is works.
is it possible to use a different meta tag for landscape device vs. portrait device
e.g. I want to use this meta tag for ipad portrait mode only
<meta name="viewport" content="width=device-width, initial-scale=0.70, maximum-scale=1">
and for landscape mode on the ipad i want to change the initial-scale to this
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
Does stating
<meta name="viewport" content="width=device-width" />
have the same effect as stating
<meta name="viewport" content="width=768" />
for the ipad?
It depends indeed on the orientation of the device: setting a specific pixel value will cause your layout to be scaled up with a factor of 1.333 to fit inside the 1024px device width when in landscape mode.
Setting width=device-width on the other hand will not scale anything up, but change the viewport width, for which you then can craft an optimized layout using media queries. Or that is at least the theory: the iPad somehow interprets width=device-width as 768px even in landscape mode. In order to get the real device width, you have to add initial-scale=1.
Hence, I disagree with James' suggestion. Just go for:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
and deal with size differences using liquid / responsive layout techniques.