A user encountered a z-index layering issue where the announcement bar appeared in front of the header when scrolling on both mobile and desktop versions of their Shopify store using the Stiletto theme.
Solutions Provided:
Three different approaches were offered to fix the layering problem:
Solution 1: Add custom JavaScript code to theme.liquid file above the </body> tag to dynamically adjust z-index values
Solution 2: Insert CSS code (z-index: 511 !important) targeting the header section through the theme customizer’s Custom CSS area
Solution 3: Add CSS styling to theme.liquid before the </head> tag to control header z-index
Resolution:
The issue was successfully resolved. The user confirmed one of the solutions worked, though they didn’t specify which approach they implemented. All solutions included visual examples showing the corrected header layering.
Summarized with AI on November 2.
AI used: claude-sonnet-4-5-20250929.