Button Spacing

Button Spacing

VicBrew1
Excursionist
44 1 10

Hi Everyone! 

 

I have some custom liquid code that puts two buttons underneath two columns. I just want to align the buttons in the center of each column. Having some trouble, I've tried to use "margin" to align them but they show up off centered on the store page. I tried naming the classes different to reference them in CSS separately but no luck. 

 

 

VicBrew1_1-1734115658096.pngVicBrew1_2-1734115680776.png

 

VicBrew1_3-1734115825330.png

Code: 

<div class="left"><a class="button button--primary" href="https://www.paypal.com/donate/?business=D4U5FBG8J9VKY&amp;no_recurring=0&amp;item_name=The+GGFF+boos...">
Give
</a></div>
<div class="right"><a class="button button--primary1" href="https://www.paypal.com/donate/?business=D4U5FBG8J9VKY&no_recurring=0&item_name=Your+support+helps+me...">
Give
</a></div>

 

Any suggestions? Any help would be appreciated! Thank you!

Replies 2 (2)

PaulNewton
Shopify Partner
7536 666 1595

Hi @VicBrew1  put them in a wrapper and style that wrapper to text-align: center;

<div style="text-align:center;> ... </div>

💣be aware that your trying to relatively center separate elements heirarchies so it may look good on your screen but may break on other screen sizes.

The proper way to do this is to actually customize the target section to have buttons.

 

If you need this styled further or sections customized for you  then contact me for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


VicBrew1
Excursionist
44 1 10

Sorry I tried this but it didn't work. Maybe I didn't do it right?