why is my button top border no showing

Topic summary

A Shopify store owner is experiencing a CSS issue where the top border of their “Add to Cart” button is not displaying properly. The problem also affects their contact form.

Proposed Solutions:
Multiple developers suggested similar CSS fixes:

  • Modifying the z-index property from -1 to 1 in the button’s ::before pseudo-element
  • Adding custom CSS code to either theme.liquid, base.css, or other theme files
  • Adjusting overflow properties for form containers

Current Status:
The issue remains unresolved. The original poster has tested multiple suggested solutions but reports that “none of these solutions work” and expresses frustration that the fixes are not effective for their specific case.

Technical Context:
The problem appears related to CSS layering (z-index) and pseudo-elements that create shadow/border effects on buttons. Screenshots were shared showing the missing border issue on both the product page button and contact form fields.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

https://yoga-spirit-mauritius.myshopify.com/

rtewth

Hey @TBS2023

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

Hello @TBS2023

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.product-form__buttons button { border-top: 1px solid #fff !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Hello @TBS2023 , Please follow the steps.

  1. Go to your Online Store
  2. Click on “Themes”
  3. Select “Edit code”
  4. Open your “base.css” CSS file.
  5. Change the following code at the end of the file.

change the css of z-index to 1 → z-index: 1;

.button:before, .shopify-challenge__button:before, .customer button:before, .shopify-payment-button__button--unbranded:before, .shopify-payment-button [role=button]:before, .cart__dynamic-checkout-buttons [role=button]:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1; / change this css of z-index to 1 -> z-index: 1; / 
    border-radius: var(--buttons-radius-outset);
    box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) rgba(var(--color-shadow), var(--shadow-opacity));
}

see the screenshot below.

Feel free to reach out if you have any questions or need assistance.

Hello @TBS2023
Add the code in css file

.product-form__buttons button::before {
z-index: 1;
}

Here is the output

I hope this solution meets our needs.
Thank you!!

Hi @TBS2023 ,

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:


Here is result:

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you :heart_eyes:

This also applies to my contact form on the first block

https://yoga-spirit-mauritius.myshopify.com/pages/contact

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

._formFieldContainer_1ydxd_5 { top: 3px !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Hello @TBS2023

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file base.css, theme.css, styles.css, custom.css or theme.scss.liquid
Step 3: Insert the below code at the bottom of the file → Save

div#form-container-ref form._formFieldset_1ll8d_67{
    padding: 2px;
}

Best Regards,
DWS

none of these solution work! :disappointed_face:

it didn’t work :disappointed_face:

@TBS2023 Add This

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

._formContainer_stahb_30 { overflow: visible !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

why does it not work for me :disappointed_face: