I want to reduce the amount of dead space between these custom buttons. Can anyone help? Is there a code i could use? I can’t find anything…
Thank you!
Topic summary
Goal: Reduce the vertical “dead space” between custom buttons on a product page.
-
Context: The page link was shared, along with a screenshot showing large gaps between buttons. The buttons are (anchor) elements styled to look like buttons.
-
Fix provided: Add CSS directly in each button’s style attribute:
margin: 0.5rem 0;
This decreases the top/bottom spacing. “margin” controls outer space; “rem” is a unit relative to the root font size, making the spacing responsive. -
Outcome: The change was implemented and confirmed to work.
-
Status: Resolved. The solution was acknowledged, and marking the answer as the accepted solution was requested.
-
Notes: No broader theme or stylesheet changes were discussed; the fix relies on inline styles. The screenshot aided context but wasn’t required to apply the solution.
Can you share me the link of the page
Hello @kimr3d ,
I see you are using Anchor tag as a button, which has style=“” attribute. Inside that attribute (inside double comma) add this code:
margin: 0.5rem 0;
It makes the gap comes little closer.
It should look like this:

If this helps you, please mark this as a solution and drop a like.
Thank You,
Thank you. I’m going to try it now!
It worked! Thank you ![]()
Mark that answer as an solution
