Sticky Block

Hey everyone does anyone knows how to make a bloc sticky, when I do it with the menu brick then on mobile it shows the hamburger bar and I don’t want it to show, I just want a button to show in a sticky bloc like a subscribe button, see image.

can any of the maters here help

If you have it all the time on top, you can create a div with a specific class and then add this css to the header:

This doesn’t work.

Hello,

try adding a z-index.

1 Like

that worked, good job!

OK, it’s an old thread but this is driving me nuts.

I have created a test case. I want a fixed-width sticky bloc. I can make it sticky but I can’t keep it centered. My custom class is like so:

.make-sticky{
text-decoration:none;
top:0px;
z-index:1001;
width:320px;
left:auto;
right:auto;
margin-left:auto;
margin-right:auto;
position:fixed;
}

Project file attached.
stickytest.bloc (1.4 MB)

Please tell me where I’m going wrong.

Use % instead of px. Reduce your z-index to 1 to avoid additional issues in your project. No need to set margin as it will not do anything.

Thanks for the suggestion. I set the left and right positioning values to 0 and now it works.

Thank you.