Buy Button Not Centering

Highlighted
New Member
4 0 0

Hello!

 

I have Shopify buy buttons on my squarespace page (aretios.com/thedaily) and even though I hit "center" alignment, they will NOT center.

How can I fix this?

 

Thank you so much for your help!

•••

Here is the code for the button:

 

<div id='product-component-1589469777320'></div>

<script type="text/javascript">

/*<![CDATA[*/

(function () {

  var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';

  if (window.ShopifyBuy) {

    if (window.ShopifyBuy.UI) {

      ShopifyBuyInit();

    } else {

      loadScript();

    }

  } else {

    loadScript();

  }

  function loadScript() {

    var script = document.createElement('script');

    script.async = true;

    script.src=scriptURL;

    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);

    script.onload = ShopifyBuyInit;

  }

  function ShopifyBuyInit() {

    var client = ShopifyBuy.buildClient({

      domain: 'aretios.myshopify.com',

      storefrontAccessToken: 'b1d6304223241deac0518cb4f6d1c2b7',

    });

    ShopifyBuy.UI.onReady(client).then(function (ui) {

      ui.createComponent('product', {

        id: '3670633021536',

        node: document.getElementById('product-component-1589469777320'),

        moneyFormat: '%24%7B%7Bamount%7D%7D',

        options: {

  "product": {

    "styles": {

      "product": {

        "@media (min-width: 601px)": {

          "max-width": "calc(25% - 20px)",

          "margin-left": "20px",

          "margin-bottom": "50px"

        }

      },

      "button": {

        "font-size": "14px",

        "padding-top": "15px",

        "padding-bottom": "15px",

        "color": "#000000",

        ":hover": {

          "color": "#000000",

          "background-color": "#e6e6e4"

        },

        "background-color": "#fffffd",

        ":focus": {

          "background-color": "#e6e6e4"

        },

        "border-radius": "0px",

        "padding-left": "29px",

        "padding-right": "29px"

      },

      "quantityInput": {

        "font-size": "14px",

        "padding-top": "15px",

        "padding-bottom": "15px"

      }

    },

    "contents": {

      "img": false,

      "title": false,

      "price": false

    },

    "text": {

      "button": "GET MY COPY"

    }

  },

  "productSet": {

    "styles": {

      "products": {

        "@media (min-width: 601px)": {

          "margin-left": "-20px"

        }

      }

    }

  },

  "modalProduct": {

    "contents": {

      "img": false,

      "imgWithCarousel": true,

      "button": false,

      "buttonWithQuantity": true

    },

    "styles": {

      "product": {

        "@media (min-width: 601px)": {

          "max-width": "100%",

          "margin-left": "0px",

          "margin-bottom": "0px"

        }

      },

      "button": {

        "font-size": "14px",

        "padding-top": "15px",

        "padding-bottom": "15px",

        "color": "#000000",

        ":hover": {

          "color": "#000000",

          "background-color": "#e6e6e4"

        },

        "background-color": "#fffffd",

        ":focus": {

          "background-color": "#e6e6e4"

        },

        "border-radius": "0px",

        "padding-left": "29px",

        "padding-right": "29px"

      },

      "quantityInput": {

        "font-size": "14px",

        "padding-top": "15px",

        "padding-bottom": "15px"

      }

    },

    "text": {

      "button": "Add to cart"

    }

  },

  "cart": {

    "styles": {

      "button": {

        "font-size": "14px",

        "padding-top": "15px",

        "padding-bottom": "15px",

        "color": "#000000",

        ":hover": {

          "color": "#000000",

          "background-color": "#e6e6e4"

        },

        "background-color": "#fffffd",

        ":focus": {

          "background-color": "#e6e6e4"

        },

        "border-radius": "0px"

      }

    },

    "text": {

      "total": "Subtotal",

      "button": "Checkout"

    },

    "popup": false

  },

  "toggle": {

    "styles": {

      "toggle": {

        "background-color": "#fffffd",

        ":hover": {

          "background-color": "#e6e6e4"

        },

        ":focus": {

          "background-color": "#e6e6e4"

        }

      },

      "count": {

        "font-size": "14px",

        "color": "#000000",

        ":hover": {

          "color": "#000000"

        }

      },

      "iconPath": {

        "fill": "#000000"

      }

    }

  }

},

      });

    });

  }

})();

/*]]>*/

</script>

0 Likes