What is the issue with the top bar shrinking in Safari on iPad and how does it affect the VH height in Webflow?

Published on
September 22, 2023

Issue with top bar shrinking in Safari on iPad and its effect on VH height in Webflow

When viewing a website designed with Webflow on Safari on an iPad, there may be an issue with the top bar shrinking. This issue occurs due to a feature in older versions of Safari called Smart App Banners. These banners automatically shrink the browser's top bar to allow more space to display a web app's banner.

This shrinking behavior affects the VH (viewport height) unit in Webflow and may lead to unpredictable results in the layout of your website. Here's how the issue affects the VH height:

  1. Shrinking of the top bar: The top bar in Safari on iPad shrinks to make space for the Smart App Banner when it detects a web app. This reduces the overall height of the viewport available for your website's content.

  2. VH height calculations: The VH unit in CSS (vh) calculates the height of an element based on the height of the viewport. However, when the top bar shrinks, the available viewport height decreases, causing the VH unit to shrink proportionally as well.

  3. Unpredictable layout: Since the VH unit is affected by the shrinking top bar, elements that are sized using VH may not display as intended. They may appear smaller or get pushed down on the page, causing layout issues and potentially obscuring content or breaking the design.

To address this issue, consider the following solutions:

  • Avoid relying solely on VH: Instead of using VH height for important elements, consider using alternative units like percentage-based heights or fixed pixel values. Using these alternatives will ensure that your layout remains consistent, regardless of the shrinking top bar issue.

  • Test and optimize for Safari on iPad: It is crucial to thoroughly test your website on Safari running on an iPad to identify any layout issues caused by the shrinking top bar. Make adjustments as necessary to ensure a seamless experience for iPad users.

  • Update Safari: Encourage users to update their Safari browser to the latest version. Newer versions of Safari may have addressed the shrinking top bar issue, minimizing its impact on the VH height in Webflow.

By addressing the issue with the top bar shrinking in Safari on iPad, you can ensure that your website's layout remains consistent and visually appealing across different devices and browsers.

Additional Questions:

  • How can I test my Webflow website on Safari on an iPad?
  • Are there any alternative units I can use instead of VH height in Webflow?
  • Can I disable the Smart App Banners feature in Safari on iPad to prevent the top bar from shrinking?