Hi,
I would like to remove the borders of this button on hover and in general on my cart page, without changing it for other pages as well. Can anyone help with the css code ?
A user seeks CSS code to remove button borders on hover specifically on their Shopify cart page, without affecting buttons on other pages. An image shows the button in question with visible borders.
Three solutions were proposed:
Moeed’s approach: Add CSS code in theme.liquid file above the </body> tag (specific code not visible in markup)
Mustafa_Ali’s solution: Insert CSS targeting :hover::after with box-shadow: none !important; within <style> tags in theme.liquid
Rahul_dhiman’s method: Add .button:not([disabled]):hover:after CSS rule with --border-offset: 0px; at the end of base.css file
All solutions involve editing theme files through the Shopify admin panel (Online Store → Themes → Edit Code). The discussion remains open with no confirmed resolution or feedback on which solution worked best for the cart-page-specific requirement.
Hi,
I would like to remove the borders of this button on hover and in general on my cart page, without changing it for other pages as well. Can anyone help with the css code ?
Hey @Daniel19901
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
:hover::after {
box-shadow: none !important;
}
Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->
under the tag before the body ----->
if this code work please do not forget to like and mark it solution
Hello @Daniel19901
Go to online store ----> themes ----> actions ----> edit code ----> base.css
add this code at the end of the file and save.
.button:not([disabled]):hover:after, {
--border-offset: 0px;
}
Thanks