Doug Foster
asked on
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/.
Thanks.
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/.
Thanks.
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-r ight:auto" on both.
I saw no social buttons in the footer, so cannot speak to that.
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-r
I saw no social buttons in the footer, so cannot speak to that.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER