Buy button, can't seem to get rid of margin-top: 20px

New Member
3 0 0

Hello all. I'm working on a simple fixed footer with a buy button. I've added the buy button and there is a 20px margin at the top of it.

 

Here:

http://thurk.wildlettuce-dev.esy.es/button-bottom/

 

It's in the .shopify-buy__btn-wrapper which is loaded from the JS file for the button from: https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js

 

And so I can't find any way to kill this margin with my basic CSS skills. I'm sure there is also a simple way to do it with javascript, but my javascript skills are nill and maybe I am missing something extremely obvious. 

 

Any help?

 

Thanks!

Christian

0 Likes
Shopify Expert
2486 416 523

HI @Lactucaman 

You can just add bellow css in Asset->theme.scss file at bottom

.shopify-buy__btn-wrapper {margin-top: 0px !important;}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
New Member
3 0 0

Hello! Thanks for your reply. I'm actually building the site on wordpress and using the buy buttons to keep my ecommerce over shopify. So I don't have this file to edit. There are CSS files which I can edit, but so far none of if kills the margin which comes from the Shopify JS.

 

What do you think?

 

Thanks,

Christian

0 Likes
New Member
3 0 0

So far for a quick fix I've made a gradient which only covers the background up to the top of the button. It's a temporary solution but I'd really like to know how to nix that margin.

 

Any help is much appreciated.

 

C.

0 Likes
Shopify Expert
2486 416 523

You can add this css in any css file or other file within <style> ... </style> tag

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes