Sticky/ Fixed Header Menu

Solved

Sticky/ Fixed Header Menu

mel30
Shopify Partner
109 2 24

Hello Experts,

 

I made the menu sticky/Fixed. but the page content gets hidden behind the menu on page load.

 

mel30_0-1711300020142.pngmel30_1-1711300070637.png

 How can this be fixed across all the page?

 

The website is https://www.athreyaherbs.com/

 

Thank you for your help.

Accepted Solution (1)

deepaksharma
Shopify Partner
449 63 99

This is an accepted solution.

Hey @mel30 

 

hi there if you are facing any issue on a purchased theme I suggest try contacting theme developer about the issue. https://help.outofthesandbox.com/hc/en-us

 

or if you wanna fix it by yourself follow below steps

 

Open theme code editor

Before editing code make sure to duplicate the theme

Online stores> Themes> Edit Code

 

find the file called styles.scss

 

and paste this code to very bottom of the file

div#shopify-section-header-new {
    position: sticky !important;
    top: 0 !important;
    background: white !important;
}

 

If you are unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

 

Hopefully, it will help you. If yes then Please don't forget to hit Like and Mark it as the solution!

Deepak Sharma || Shopify Developer || Helping eCommerce Stores
- Was my reply helpful? Accept it as solution
- Was your question answered? Mark it as an Accepted Solution.
-CHAT ON WHATSAPP | BUY ME A COFFEE | MAIL ME: ds2305187@gmail.com

View solution in original post

Replies 10 (10)

deepaksharma
Shopify Partner
449 63 99

This is an accepted solution.

Hey @mel30 

 

hi there if you are facing any issue on a purchased theme I suggest try contacting theme developer about the issue. https://help.outofthesandbox.com/hc/en-us

 

or if you wanna fix it by yourself follow below steps

 

Open theme code editor

Before editing code make sure to duplicate the theme

Online stores> Themes> Edit Code

 

find the file called styles.scss

 

and paste this code to very bottom of the file

div#shopify-section-header-new {
    position: sticky !important;
    top: 0 !important;
    background: white !important;
}

 

If you are unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

 

Hopefully, it will help you. If yes then Please don't forget to hit Like and Mark it as the solution!

Deepak Sharma || Shopify Developer || Helping eCommerce Stores
- Was my reply helpful? Accept it as solution
- Was your question answered? Mark it as an Accepted Solution.
-CHAT ON WHATSAPP | BUY ME A COFFEE | MAIL ME: ds2305187@gmail.com
mel30
Shopify Partner
109 2 24

@deepaksharma Thank you this worked

rob10k8
New Member
11 0 0

I tried this for my shop (www.nootkas.com) and it didn't work. I'm using OOTSB Turbo.

 

Any ideas?

mel30
Shopify Partner
109 2 24

@rob10k8 add this to your CSS

div#shopify-section-sections--14634054189111__header {
    position: sticky !important;
    top: 0 !important;
    background: white !important;
    z-index: 999;
}

file or theme file

 

 

rob10k8
New Member
11 0 0

Pefect!  Thanks!

 

Any chance you know how to get the shoping cart  icon in the header rather than above the header?

mel30
Shopify Partner
109 2 24

@rob10k8 Please share the screengrab of what you want to achieve

rob10k8
New Member
11 0 0

When I add the cart Icon using the check box, it makes the header larger (vertically), I would like to have it moved the section below with the menus. 

 

In the image below, I'd like to have the cart icon added:

 

Current.jpg

 

But not have as much white space when I click the checkbox:

 

cart icon 2.jpg

mel30
Shopify Partner
109 2 24

@rob10k8 You will need to do changes to your code if you are familiar with it.

 

Let me know and Ill share what needs to be done.

mel30
Shopify Partner
109 2 24

mel30_0-1726941901704.png

 

Something like this you want to achieve 

 

rob10k8
New Member
11 0 0

Yes, that is what I would like to do. 

 

I am familiar with making code changes, just not to the extent of making this change.