Styling button with flex centering

I was trying to center a button via flex but it looked like from the forum it needed extra css because of the existing style. When I added:
$el {
display: flex;
align-items: center;
justify-content: center;
}

via the button customize css area it centers the button correctly but adds padding space left and right of button to fill the column. How would I go about decreasing the padding left and right so the button isn’t as large. Turning off the padding or margin doesn’t adjust this, something to do with the flex I think?

Thank You!

URL:
http://www.rocketboysolutions.com/moore/our-agents/

Hi @rocketboy,

Thanks for reaching out.
I would suggest you add a div element into the column and put the button into it and set the Flexbox > Horizontal to center as shown in the given screenshot.

Screenshot 2022-02-10 172204

Hope it helps.
Thanks

1 Like

Thank you for the info, that did the trick!

Hi Bryce,

We’re glad that my colleague was able to help you with your issue! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.