iPhone Viewport cut-off - this must be a common issue? - css

Morning all,
I need assistance with iPhone viewport issues. I have sifted through all kinds of posts, all from 8+ years ago. Some had a similar issue, some had the exact issue. Seems none actually found a fix.
I have developed a site and cannot for the life of me work out why only on iPhone the viewport is cutting off the left of the content. The site works as expected on android, macbook and desktop. I do not have access to an iPad. All completely responsive. When I say "cut-off" I mean you cannot scroll to the left at all.
I tested on an iPhone 8 and thought, ok, it is a bit old, probably just limited to older phones but alas, when I checked with friends on an iPhone X and 11 pro they both had the same issue. It is not an issue in landscape, only portrait.
Please see below screenshots:
Iphone issue where you can see that the content is shifted to the left
Galaxy S10 where you can see the content is centered as expected
As you can see from the above, it is like the phones are readying the viewport size correctly but they are shifting the content to the left. The banner at the top is set to width: 100%; and yet it does not stretch to the far right.
Also, bizarrely it seems that the nav is happily centered but all other content is not.
I am at a loss.
This must be a common issue with an easy fix that just isn't asked, I hope. I have built this using purely CSS and HTML so nothing fancy.
Entire code can be found here in my previously unanswered post which had a little less detail.
link to the site

For anyone in the future looking into this or a similar issue, it seems that iPhone's have challenges interpreting tags. This is not limited to Safari as I tested the code on Opera and firefox on an iPhone 8 and iPhone X and the same issue occured.
Not only did the CSS applied to the tag not take effect on the iPhone but it created some form of break in the page entirely.
tags are a little outdated as I understand however it added a nice aesthetic. Instead I created the same visual effect by entirely removing the tag and using bottom-border on the SVG.
I hope this helps someone in the future.

Related

CSS Drop Shadow Breaks on Mobile | Next.js

Edit: I found out that the issue is exclusive to iPhones. I tested with an android device and it worked fine when I tried viewing the page on two different iPhones it broke on both.
This issue is mobile related, since when I shrink my browser window to the size of a mobile screen, everything looks fine. However, when I view the site on my actual mobile device, the drop shadow "breaks" at seemingly random places. If I zoom in and out these breaks will change their locations.
The current effect being used is
filter: drop-shadow(20px 10px 4px #707070);
After further research into this, I found that the issue was not specific to my website. If you go onto the Mozilla MDN Docs on a recent iPhone device, you'll notice that it gives you the exact same effect when zoomed in. I'm going to post this as an issue on Github as suggested in the docs. Here is what my mobile phone showed when viewing the Firefox Logo drop shadow effect.
As suggested in a comment, changing to a simple box-shadow fixed the issue, although the edges are more hard-lined and slightly less faded (using the same parameters). It's not enough to break this specific project and I know there are CSS features available that enhance this, so all is good!

Website getting cut off on iPad only

My site is live at http://brand2o.com/. The site is responsive, and works fine at any size on every desktop browser I try and on my Android phone, but the problem is that on an iPad, the right side of the header gets cut off so it says "Licensing P" instead of "Licensing Portal."
I'm having trouble figuring out where the problem lies because I can't replicate it on desktop — Chrome's device mode actually shows it having too MUCH room on the right and the website not centering instead!
Any ideas?
Edit: Looking more closely, it looks like the iPad is giving each navigation item (they're flexbox children) equal width, and messing with flex-basis and flex-grow don't make any difference. I can't find anything about it but is this any kind of known bug? Again, it looks fine everywhere else, including desktop Safari.
Some of this issues are related to version of the OS and Safari also. What I do on this instances, if you connect your iPad to your MAC you will be able to inspect the HTML and CSS and figure the issue out.
Debug apple devices
Another site
Hope this help!
Regards
Figured it out: The lis were set to width: 100%; for when the navigation collapses, and I should have overwritten it in the media query for bigger screens. I added width: auto; and it's fixed!

How to get a row to stack neatly in a site that uses Zurb-Foundation

I have a site that is a work in progress ...
It uses Zurb's Foundation ...
There is a row with four images that are spread across evenly ... (Children, Counseling, Senior Services, & Support Groups)
When you resize the window, it stacks two by two in FF, and Safari on Mac. (haven't checked IE yet).
Anyway, the problem arises in Chrome. The four images don't stack neatly two by two as they do in other browsers.
I've gone over everything with a fine-toothed comb and still am baffled as to why it's doing this.
It also does this on my iPhone with the default browser (ie, Safari), and that also bothers me to no end because that's Safari, and yet it plays nicely on the desktop version).
Anyway, any ideas why it's not playing nicely in Chrome?
Thanks in advance for any ideas, suggestions, etc ...
Removed link as the problem is fixed.
EDIT 1
Forgot to mention that this uses Foundation's version 4.
I believe you have two issues:
The text above the images is not scaling properly. When I remove the <h3>'s it corrects most of the issues.
The images for "Children & Family" and "Seniors Services" have the width and height attributes set with in the <img /> tag. When I remove the the width and height it fixes the rest of the issues within Google Chrome.
I hope that helps.

Chrome hide an element on scroll after orientationchange

I'm facing a problem I can't figure out how to solve. I'm almost sure this is a Chrome bug since in other browsers it works like a charm but I want to be sure. On my website, developed using a mobile first and responsive design approach, I have a menu that uses the Left Nav Flyout pattern. On Tablets and desktops, I show it full width.
When I load the website on my smartphone (specifically an Android device) using Chrome in Portrait mode, once I rotate the device (passing in Landscape mode) and start to scroll the page, as soon as I reach the menu position, the latter magically disappears. What is really strange is that if you try to click the space that now is completely white, you can see that the links are actually there. I tried to use the inspector to find the problem but didn't succeed.
So, wow can I solve the problem? Anyone else had this issue before? If you know it's a bug, I'm glad to add a temporary workaround as well.
I didn't find a real solution but a reasonable workaround. Of course, I still hope that someone will explain what's the cause of this issue and how to solve it.
In the meantime, I found that the problem occurs because the menu, 240px wide, is completely out of the viewport. In fact, as soon as I changed the margin-left to 239.5px the menu didn't disappear anymore.

Techniques for determining iphone vs. ipad CSS rendering problems?

I have a glaring CSS problem with my website on iphone even though it looks just fine in safari for mac and safari for ipad.
In the attached screens, notice the white background in the upper right corner is only present on the iphone (and it's not supposed to look that way).
What tools and or techniques would you use to try and isolate the cause of this rendering problem?
Here's the iPad version that's OK.
Here's the iPhone rendering of the same page with the extraneous white area in the upper right.
And for easy clicking.. the site is http://summertown.org/
tia!
-Darrell
My problem is solved. One of my super smart co-workers took pity on me and gave me the CSS fix. I'm not any smarter on HOW he figured this out... he said it was a trade secret.
Anyway, the solution was to add...
“min-width: 57.69em;”
to body css (summertown.css)

Resources