# How to make a Sticky Add-To-Cart button with Builder for a Shopify site

**URL:** <https://forum.builder.io/t/how-to-make-a-sticky-add-to-cart-button-with-builder-for-a-shopify-site/1078>\
**Category:** Visual Editor Help\
**Tags:** shopify\
**Created:** [September 29, 2021, 8:19pm UTC](https://forum.builder.io/t/how-to-make-a-sticky-add-to-cart-button-with-builder-for-a-shopify-site/1078 "2021-09-29T20:19:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/maddy/32/11_2.png) [@maddy](https://forum.builder.io/u/maddy)\
**Post date:** [September 29, 2021, 8:55pm UTC](https://forum.builder.io/t/how-to-make-a-sticky-add-to-cart-button-with-builder-for-a-shopify-site/1078/2 "2021-09-29T20:55:42Z")

</div>

Hi @anagh,

The two examples you provided are very similar to the example we have [here](https://forum.builder.io/t/how-do-you-fade-in-out-a-navbar-when-scrolling/51) (if you want the add to cart button section to show/hide on scroll). You can customize the code in that example to fit your needs.

To make the button sticky you can:

- Select the add to cart button
- Scroll down to the CSS properties section in the styles tab
- Apply these styles: position: sticky, top: 0, and z-index: 10.

This will make the button stick to the top of the page like this.

![Sep-29-2021 16-46-27](https://us1.discourse-cdn.com/flex020/uploads/builder/original/1X/c91344e6a4a0d95c020a78d7f9906404e2593398.gif)

If you want the add to cart button to stick to the bottom instead, you can:

- Select the add to cart button and give it position: fixed in the layout section of the styles tab
- While in the layout section, give the button a bottom, left, and right value of 0.
- Give the button a z-index value if needed so it sits on top of your page content.

I created a fiddle example of both [here](https://builder.io/fiddle/ec6db62693cb424192f242fa3caf6f19).

---

_[View the full topic](https://forum.builder.io/t/how-to-make-a-sticky-add-to-cart-button-with-builder-for-a-shopify-site/1078)._
