Sticky/Back on scroll Header not working on mobile

Topic summary

Mobile-specific header/menu malfunction on a Shopify site using the Sense theme. Desktop behavior is correct, but mobile deviates.

Key issues:

  • Sticky/back-on-scroll header: The header does not reappear when scrolling; it stays at the very top instead of behaving as a “back-on-scroll” (reveal-on-scroll-up) header.
  • Burger menu behavior: When opened on mobile, the menu overlay is scrollable and the page behind remains scrollable instead of being locked (no body scroll lock), causing background page movement.

Context:

  • Possible conflict from leftover custom code related to a previous transparent header/overlay setup.
  • Store URL provided for inspection: www.motifartwork.com.

Notes/definitions:

  • Sticky header: a header that remains fixed while the page scrolls.
  • Back-on-scroll header: a header that reappears when the user scrolls upward.

Status:

  • No fixes or code excerpts shared yet; no responses with solutions. The issue remains open and likely requires auditing custom code affecting header behavior and scroll locking on mobile.
Summarized with AI on December 15. AI used: gpt-5.

Hey everyone,

I’m having an issue with my header on mobile and I can’t figure it out. On desktop everything works perfectly, but on the phone it breaks.

On mobile, the sticky header isn’t actually sticky. It stays at the very top and doesn’t come back when scrolling. I’m using a back-on-scroll header, Sense Theme.

The burger menu also behaves wrong on mobile. When it’s open, the menu itself is scrollable and the page behind it still scrolls, instead of being fixed. Not sure if this is related to the header issue or a separate problem.

I suspect there might still be some leftover custom code from an old transparent header or overlay setup that’s interfering, but I’m not 100% sure.

Store URL: www.motifartwork.com

Any ideas or help would be hugely appreciated!

You can add this code to Custom CSS of your theme settings and check again.

body .section-header { position: fixed; }

Best regards,
Dan from Ryviu: Product Reviews App

Hey Dan,
The Sticky header works again with this code, thanks for that!!
One big issue tho: My announcment bar will be overlaying the header and on desktop the headers width will only be ca 40% when this code is applied. It´s very odd.

My bad, please update the code to this

@media (max-width: 749px) {
    body .section-header { position: fixed; }
}
1 Like

The problem is because of this code injected by Foxify(?)

@media (max-width: 749px) { 
  html.x-page, html.x-page body {overflow-x: hidden !important}
  .foxify-main { 
    overflow: visible !important; } 

    html.x-page:has(.x-main-product), html.x-page body:has(.x-main-product) {overflow-x:hidden !important}
  }

Which sets overflow:hidden on html and body elements.
overflow: hidden prevents sticky elements from actually sticking.
Because of media-query this only happens on mobile.

One option to fix this is to use overflow: clip instead.

Since the code is added by an App, you should contact the app developer.

Alternatively, you can try overriding these by adding your own code like this into “Theme settings”=> “Custom CSS”

@media (max-width: 749px) { 
  html.x-page, 
  html.x-page body {
     overflow-x: clip !important;
     overflow-y: visible !important;
  }
  html.x-page:has(.x-main-product), 
  html.x-page body:has(.x-main-product) {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
}

Thanks so much! Was looking for a fix for long long time … This fixed it :>

1 Like