Skip to content

Guides

Website App Content Behind the Android Status Bar? The Edge-to-Edge Fix (2026)

Your header sits under the clock and battery icons, or a bottom bar hides behind the gesture area. Here is what Android 15 and 16 changed, whether the app or your website has to fix it, and how to avoid a doubled gap.

12 min read

If the top of your website app is sitting behind the Android status bar, the cause is edge-to-edge enforcement. Apps that target Android 15 (API level 35) or higher draw behind the system bars, and apps that target Android 16 (API level 36) can no longer opt out on Android 16 devices. The fix is padding, either in the app shell or in your website's CSS, and the main risk is fixing it in both places and ending up with a doubled gap.

Why is my website app content behind the status bar?

Once an app targets SDK 35 or higher and runs on Android 15 or later, its window spans the whole display and draws behind the status bar, caption bar and navigation bar, according to Google's edge-to-edge documentation for Views. Anything your page puts at the very top or bottom edge, such as a logo, a hamburger button or a sticky checkout bar, can end up underneath system icons or the gesture area.

On Android 15 an app could opt out with an attribute called windowOptOutEdgeToEdgeEnforcement. Google's Android 16 behavior changes page says that for apps targeting Android 16 (API level 36), the attribute is deprecated and disabled, so on an Android 16 phone there is no opt-out. The same page says the attribute keeps working if an app targeting 36 runs on an Android 15 device. That is why an app can look fine on one phone and broken on another.

This often appears right after a rebuild. Google Play asks for newer target levels over time, as covered in our guide to Google Play's target API requirement, so an app that looked fine last year can show the overlap the first time it is rebuilt for a newer target.

Which Android versions and app settings trigger it?

When edge-to-edge applies to an app. Based on Android Developers pages last updated October 28, 2026; checked November 14, 2026.
App targetsPhone runsEdge-to-edge?Can the app opt out?
API 34 or lowerAndroid 15 or 16Not enforced by the system, because enforcement starts at a target of API 35Not needed
API 35Android 15 or higherYes, enforcedYes, with windowOptOutEdgeToEdgeEnforcement
API 36Android 15Yes, enforcedYes, the attribute still works
API 36Android 16Yes, enforcedNo, the attribute is disabled
Any targetAndroid 14 or lowerOnly if the app's own code calls enableEdgeToEdgeNot applicable

The practical takeaway is that testing on a single phone tells you very little. Check one device on Android 15 or later and, if you can, one on an older version, because the overlap you see depends on both the app's target level and the phone's Android version.

Who has to fix it: the app or your website?

Two layers can handle the space under the system bars. The native shell is the Android app around your site, and it can add padding around the web view. Your website can also add padding itself with CSS safe-area values. Either layer alone is enough. Both at once is the usual cause of an oversized gap.

Symptoms, likely cause and where to fix them
What you seeLikely causeWhere the fix goes
Logo or menu button sits under the clock and battery iconsNothing is padding for the status barShell padding, or env(safe-area-inset-top) in your CSS
Sticky bottom bar overlaps the gesture bar or three-button barNothing is padding for the navigation barShell padding, or env(safe-area-inset-bottom) in your CSS
A large empty strip at the top after you added CSS paddingShell and CSS both applied the same insetThe shell should zero out insets it has already handled
Fine on Android 14, broken on Android 15 or laterEdge-to-edge enforcementAny of the fixes above

Does Android WebView pass safe-area values to my CSS?

Yes, with a version caveat. Google's Understand window insets in WebView page says WebView forwards system bar and display cutout dimensions to web content through the CSS safe-area-inset variables. It lists when that support arrived:

WebView window-inset support by milestone, per Android Developers (page updated October 28, 2026)
MilestoneWhat was addedApplies to
M136displayCutout() and systemBars() support through CSS safe-area insetsFullscreen WebViews only
M139ime() (keyboard) support through visual viewport resizingAll WebViews
M144displayCutout() and systemBars() supportAll WebViews, regardless of fullscreen state

The same page says WebView should receive non-zero inset values only when system UI directly overlaps the WebView's screen bounds. A WebView that does not touch the system bars should see zeros. Put those two facts together and a CSS-only fix may do nothing on a phone with an older WebView, or when the WebView does not reach the top edge. The page does not describe that failure case, so treat it as something to test, not a documented behaviour.

How do I fix the overlap with CSS?

  1. 1

    Confirm what is covered

    Open the app on a phone running Android 15 or later. If a header, button or bottom bar sits under system icons or the gesture area, this is the issue.

  2. 2

    Add viewport-fit=cover

    Set your viewport meta tag to width=device-width, initial-scale=1, viewport-fit=cover. Chrome's edge-to-edge guidance uses this value to opt a page in. Android's WebView page does not say whether WebView needs it, so add it and test.

  3. 3

    Pad the top

    Give your fixed or sticky header padding-top: env(safe-area-inset-top, 0px). The 0px fallback keeps browsers that do not report a value unchanged.

  4. 4

    Pad the bottom

    For elements fixed to the bottom, use bottom: env(safe-area-inset-bottom, 0px), the pattern Chrome's guidance shows for bottom-anchored content.

  5. 5

    Test on two phones

    Check at least one phone with a recent WebView and one older device, in portrait and landscape.

  6. 6

    Look for a doubled gap

    If the space at the top is now too large, the shell is padding too. Ask whoever builds the app to zero the insets it already used, or remove your CSS.

Chrome's edge-to-edge migration guide explains the same safe-area variables for websites in Chrome on Android. If you want this CSS to apply only inside the app and not on your public site, see how app-only styling works in our guide to optimizing your website before turning it into an app.

Avoid hard-coding a pixel height for the status bar. Status bar and display cutout sizes differ between phones, and a fixed number that suits one device adds extra space or too little on another. Safe-area values are meant to avoid that guesswork.

What if I control the Android code?

Google's WebView guidance describes a pattern for apps with their own layout. Read the system bar and display cutout insets, apply them as padding on the native container, then pass a new insets object to the WebView with those types set to Insets.NONE. That tells the WebView the space is already handled, which prevents double padding while still letting it receive later updates.

The same page warns against returning WindowInsetsCompat.CONSUMED in this situation. If the insets change later, for example when the keyboard hides, a consumed set stops the WebView from getting the update and it can keep stale padding from the earlier state. Google calls this ghost padding. For older Android versions, the edge-to-edge page says to call enableEdgeToEdge in the activity if you want the same behaviour there.

Pre-launch checklist for system bar overlap

  • Test on Android 15 or later, plus one older phone, because behaviour depends on the phone's Android version.
  • Check the top edge and the bottom edge separately: status bar at the top, gesture or three-button bar at the bottom.
  • Rotate to landscape on a phone with a camera cutout. Google's guide notes apps draw into the display cutout by default.
  • Open the keyboard on a form near the bottom of a page. WebView M139 and later resize the visual viewport for the keyboard, so make sure your page scrolls the field into view.
  • Look at sticky headers, cookie banners, chat buttons and checkout bars, since fixed elements are the usual casualties.
  • Run the file upload and camera checks in the same session, using our guide to WebView file upload, camera and location fixes.

Frequently asked questions

Why is my WebView app header hidden under the status bar on Android 15?
Apps that target Android 15 (API level 35) or higher are shown edge-to-edge on Android 15 and later, which means the window draws behind the status bar and navigation bar. Unless the app or your website adds padding for those areas, content at the very top can sit under system icons.
Can an app opt out of edge-to-edge on Android 16?
Not if it targets Android 16 (API level 36). Google's Android 16 behavior changes say the windowOptOutEdgeToEdgeEnforcement attribute is deprecated and disabled for those apps on Android 16 devices. It still works if the same app runs on an Android 15 device.
Does env(safe-area-inset-top) work in Android WebView?
Android's WebView documentation says system bar and display cutout values are forwarded to CSS safe-area-inset variables. Support for fullscreen WebViews started in M136 and support for all WebViews started in M144, so an older WebView can report zero. Test on more than one phone.
Why is there a big gap at the top after I added safe-area padding?
The most likely reason is double padding: the native app and your CSS both applied the same inset. Google's guidance is for the native layer to set the insets it already handled to zero before they reach the WebView, or for you to remove the CSS padding.
Does this problem happen on Android 14 and older phones?
The system enforces edge-to-edge for apps that target API 35 or higher on Android 15 and later. On older Android versions, an app only draws edge-to-edge if its own code calls enableEdgeToEdge, so the problem is much less common there.