How can I make header buttons sticky in my webpage code?

Hello!

I have inserted these button below the header through this code.

Moda

Now i want to fix(sticky) these button with header. I have tried to put the codes in theme.css and theme.js (I have seen these codes from forum) but to no avail.

Here the sample store m.milanoo.com

Kindly suggest me.

[email removed]Tahausaid To fix the header, you need to add the CSS code into your theme.css file.

Add the following code

.hero__btn{postion:fixed !important;}

or .hero__btn{postion:sticky!important;}

Hope it will be helpful for you. If the code doesn’t work then share your store URL so that I can check and I’ll try to provide you with the possible solution.

@EFOLI-Emilia7 No, it cant work. Store url is aromadelicioso.myshopify.com

And its password is whawte

[email removed]Tahausaid The sticky option isn’t working because you have added the buttons on the main body. In your case, the simple way would be adding the button inside the header div. Have a look at this Screenshot

Thank you so much.

it works