Safari iOS 26 viewport bug

There seems to be a issue related to elements on websites that are meant to fill the entire viewport at the same time as being positioned fixed or sticky using css.


Typical examples are full screen navigation menus like the one on New York Times as seen in the screenshots here.


we clearly see that the menu or modal will no render behind the area close to the address bar, even though the other website content will.




[Edited by Moderator]

iPhone 15 Pro

Posted on Sep 17, 2025 12:45 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 17, 2025 6:14 AM

So I have not found a way to get an element to extend all the way below the viewport. Somehow this eludes me, but I have found out how apple gets it to look like it does (e.g. in their dropdown-navigation on https://apple.com )


```html

<html>

<div

style="

position: fixed;

top: 0;

left: 0;

right: 0;

display: block;

width: 100vw;

height: 48px;

"

>

<div style="background-color: #161617; height: 100vh"></div>

</div>

</html>

```


If you load this HTML in iOS 26 safari, you will see that the area underneath the url-overlay changes its background color to match #161617 .


Even though it looks like I'm doing too much here, Literally every style in here is relevant. To achieve the desired behavior, you need a fixed container (top, left, right = 0, display = block, width at least 85vw, and a height less than 50vh). Then you need to put your content (including the background color) inside this container and give it a 100vh height and then you will see a region under the overlays matching your background color, which gives it a feeling like you have a full-height navigation.


This won't work for every use case, but it worked for mine, and it is how apple seems to work around this in their main site. Kinda insane how un-intuitive it is -- feels like a bug but this work-around works.

11 replies
Question marked as Top-ranking reply

Oct 17, 2025 6:14 AM in response to vidar293

So I have not found a way to get an element to extend all the way below the viewport. Somehow this eludes me, but I have found out how apple gets it to look like it does (e.g. in their dropdown-navigation on https://apple.com )


```html

<html>

<div

style="

position: fixed;

top: 0;

left: 0;

right: 0;

display: block;

width: 100vw;

height: 48px;

"

>

<div style="background-color: #161617; height: 100vh"></div>

</div>

</html>

```


If you load this HTML in iOS 26 safari, you will see that the area underneath the url-overlay changes its background color to match #161617 .


Even though it looks like I'm doing too much here, Literally every style in here is relevant. To achieve the desired behavior, you need a fixed container (top, left, right = 0, display = block, width at least 85vw, and a height less than 50vh). Then you need to put your content (including the background color) inside this container and give it a 100vh height and then you will see a region under the overlays matching your background color, which gives it a feeling like you have a full-height navigation.


This won't work for every use case, but it worked for mine, and it is how apple seems to work around this in their main site. Kinda insane how un-intuitive it is -- feels like a bug but this work-around works.

Nov 30, 2025 4:24 PM in response to vidar293

Safari now adapts the top and bottom UI bars based on the background color, which can cause inconsistent behavior especially with modals and full-height menus where background colors shift.


A reliable fix is to control the background at the body level using JavaScript when toggling these elements.


Example: Full-height menu

When the menu toggle is triggered:

  • Apply a white background to the <body>
  • Set the <main> content opacity to 0


This ensures everything behind the open menu becomes white, which forces Safari’s toolbars to switch to white as well, creating a clean, edge-to-edge


Example: Modals with overlays

If the modal uses a semi-transparent overlay:

  • Apply the same body-level styling (white background)


Safari will still limit the scrolling between the top and bottom bars.


Different workaround might he needed for different cases but in nutshell that’s how you get around this stupid liquid issue


I have implemented this here so if you click book now and or open all the items in the menu and scroll (not a full height menu but same concept) when you scroll it gives it the same look apple site menu does.


Can post the JS if need for this if any of the above made sense lol.


https://fynx-detailing.com/


Oct 27, 2025 2:42 PM in response to vidar293

I've been frustrated by this issue the past few days. Wanted to make a loading screen, but couldn't make it full screen so the user was still able to see a bit of the website while the (supposedly fullscreen) loading screen was displayed (behind the dynamic island and the addresss bar). Wouldn't call this a great soluation, but I think this is a decent workaround in my case.


I just added display none to everything but the loading screen before the website loaded. Once the content iss fully loaded and I am triggering the fade out animation for the loading screen, I am removing the display none property and it seems to do the job.


While doing my research, I've also noticed Apple removed support for theme-color in safari which is unfortunate, leaving me (and others) to non-ideal solutions like the one described above, but I think it workss for now.

Sep 21, 2025 12:56 PM in response to vidar293

I've been fighting with the same problem since upgrading to ios26 this morning. I've tried numerous workarounds (on my hobby site), but to no avail. I've seen the issue present on a number of other websites (specifically ones making use of full screen modals), so I'm not too worried about it at this stage. I'll hang around until there's some more detail around solving it. It's just not a great customer experience for visitors though.

Safari iOS 26 viewport bug

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.