Close padding of pop up link

Topic summary

A user seeks to reduce excessive spacing in a product popup modal on their Shopify store, specifically the padding around a “Quick add” button and inventory information. They’ve attempted custom CSS but haven’t achieved the desired tight spacing.

Multiple solutions provided:

  • Several respondents offered CSS code snippets targeting elements like modal-opener.product-popup-modal__opener, .product__inventory, and variant-selects
  • Solutions involve adding code to base.css, style.css, or theme.liquid files
  • Code primarily uses margin: 0 and !important declarations to eliminate spacing

Current status:

  • The user tested one solution and reports it reduced bottom padding successfully
  • However, top padding remains excessive and doesn’t match the tighter bottom spacing
  • The issue is ongoing with the user requesting further adjustments to achieve uniform, minimal padding throughout the popup
Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

How do you decrease the space as indictated by the arrows I drew on here. I added some code but I can’t seem to close the padding. Please help. The url is www.whoglobal.shop

2 Likes

Hi @samueljoonjung

You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file

modal-opener.product-popup-modal__opener.quick-add-hidden {
    margin: 0 !important;
}

p#Inventory-template--24123061305640__main {
    margin-bottom: 0 !important;
}

variant-selects#variant-selects-template--24123061305640__main {
    margin-top: 0 !important;
}

Result

Best,

Liz

Hi @samueljoonjung

In your previous post I’ve already provide the code. BUt if you like more lesser space. TRy this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
modal-opener.product-popup-modal__opener.quick-add-hidden {
    margin: 0;
}
.product__inventory {
    margin-bottom: 0;
}
variant-selects {
    margin-top: 0 !important;
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hi @samueljoonjung ,

Go to Online Store, then Theme, and select Edit Code.
Search for base.css/theme.css/style.css/main.css/custom.css file Add the provided code at the end of the file.

.product-popup-modal__button {
    min-height: 0rem !important;
}
modal-opener.product-popup-modal__opener.quick-add-hidden {
    margin: 0px !important;
}

Hey @samueljoonjung

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

This one is close but the top padding is still there. i want it to be tight like the bottom.