Sticky/Fixed Header and Navigation for Debut Theme

Topic summary

Implementation of Sticky Header for Debut Theme

This thread provides a tutorial for adding a sticky/fixed header to Shopify’s Debut theme, with two options:

  • Option 1: Makes the entire header (including announcement bar) sticky
  • Option 2: Makes only the navigation sticky, allowing the announcement bar to scroll away

Both require adding CSS code to theme.scss.liquid and JavaScript to theme.js.

Common Issues Reported:

  • Content hidden behind header: The header covers page content instead of pushing it down. Users resolve this by adjusting padding values (typically changing from 80px to higher values like 107px, 130px, or 200px depending on header height)
  • Page jumping/loading glitch: Content briefly appears behind the header on page load before repositioning correctly
  • Mobile menu malfunction: After scrolling, dropdown menus don’t display properly
  • Search/cart overlay problems: Search drawer and cart don’t appear correctly when header is sticky
  • Gap above sticky header: Empty space appears between top of viewport and header when scrolling

Alternative Solutions:

Several users offer modified code snippets and workarounds. One contributor promotes a free professional solution via external link.

Status: The discussion remains ongoing with unresolved issues for many users, particularly around the content overlap and page-load animation problems. The tutorial is unsupported by Shopify and specific to unmodified Debut theme.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hi everyone,

Could someone please help me understand the following? I used the suggested code (thank you SeanP!!) and the collection page in my Dell laptop was not showing the collection title, looking like this:

Part of the code provided is this:

#PageContainer {
padding-top: 80px;
}
@media screen and (max-width: 749px) {
#PageContainer {
padding-top: 70px;
}
}

I was under the impression that the first part is for desktop/laptop and the second part for mobiles but the only way I managed to fix the problem was by changing the media screen section from 70px to 90px and now the web page in my laptop computer looks like this:

So I’m confused about the code above, I’ll be greatful if someone can explain why I need to change the media section above to fix the issue in my laptop’s screen.

One more question, the product pages show a capital F at the top left corner like this:

Most probably I typed an extra F somewhere in the code, which of the liquid or css files should I look at?

Thank you very much in advance.

MP

1 Like