I am trying to stop my sticky header menu from disappearing and revealing itself upon scrolling up and down.
I’ve padded the announcement bar to act as a full-page image above the header, I would like for the header to stick to the top of the web page upon scrolling down, and not to disappear and reappear upon scrolling up and down.
We are OneExperts from OneCommerce and we here to help you out.
Firstly, we want to congratulate you on your new Shopify store. We understand from your question is you’re trying to make the header menu of your Shopify store “sticky” so that it stays visible when the customer scrolls up and down the page, you can achieve this using some custom CSS.
Here is an example of how to do this:
In your Shopify admin, navigate to the theme editor.
From the theme editor, locate the “Assets” folder, and click on the “theme.scss.liquid” file to open it.
This will add a padding top of 80px and match the height of the announcement bar to the header and give the image an effect of the header sitting behind it.
Click on “Save” to apply the changes, you should now see the header fixed on top of the page, even when the customer scrolls down.
Please note that the above codes are examples and the class and id names may vary depending on the theme you are using and how it is constructed. It is always a good idea to backup your theme before modifying it and to check the browser’s developer tool or contact theme support for further help.
Please let us know if you have any other question or if you need further clarification.
This worked perfectly, thank you… but now there is a lag on the sticky header… I need to scroll down maybe 100px before it sticks… any ideas on how to fix that as well?