https://yoga-spirit-mauritius.myshopify.com/
rtewth
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:
z-index property from -1 to 1 in the button’s ::before pseudo-elementtheme.liquid, base.css, or other theme filesoverflow properties for form containersCurrent 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.
Hey @TBS2023
Follow these Steps:
Go to Online Store
Edit Code
Find theme.liquid file
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
Go to Online Store → Theme → Edit code.
Open your theme.liquid file
Paste the below code before on theme.liquid
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.
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 ![]()
This also applies to my contact form on the first block
You can add code by following these steps
Go to Online Store → Theme → Edit code.
Open your theme.liquid file
Paste the below code before on theme.liquid
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! ![]()
it didn’t work ![]()
@TBS2023 Add This
You can add code by following these steps
Go to Online Store → Theme → Edit code.
Open your theme.liquid file
Paste the below code before on theme.liquid
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 ![]()