We help IT Professionals succeed at work.

css centering and sizing buttons

I'm trying to get the buttons on my home page to be the same size and centered.  This clearly isn't my strong point.

How do i modify the css so these buttons will be forced to the same width (why is one so wide when the text isn't that wide?) and centered on the page?

Page is at https://nyackboatcharter.com/.

Watch Question


and as a bonus, the social buttons at the bottom of the footer also should be centered.  this is in a plugin for blocks, and not the theme, unfortunately.  But maybe i can override the left justification.
Top Expert 2004

Regarding the sizing of the two yellow buttons, I'm assuming the top one is "oversized" and the bottom one is sized as desired.  The difference is due to a class "aligncenter" applied to the top one, which assigns "display:block".  That makes the container, by default, take up the entire width available to it.  You can see that the bottom button is assigned "display:inline-block", which essentially "trims" it to the necessary width.  

Also, neither button has an explicit width assigned, so they will still likely not have the same size once you correct the above issue.

Regarding the placement of the buttons, look at the class "one-half", which sets an explicit left margin.  To center the buttons properly, you'll need to set "margin-left:auto;margin-right:auto" on both.  

I saw no social buttons in the footer, so cannot speak to that.
Top Expert 2004
I took another look in a different browser.  Your social icons are enclosed in <div class="sfsi_shortcode_container">.  That class is assigned "float:left" through style in the page itself.  Whatever code is generating the box and items is also setting specific style.  You'll need to override that.