One of my add ti cart button is small and other is big cauing a very bad layout issue , please help me fix this
Topic summary
A Shopify store owner reported inconsistent sizing between “Add to Cart” buttons, with one appearing smaller than the other, creating layout problems.
Initial Solution:
Multiple developers provided CSS fixes targeting the soldoutButton class, adding properties like min-height: 44px and flexbox alignment. The code should be added to either component-card.css, base.css, or within <style> tags in theme.liquid.
Follow-up Request:
After confirming the button fix worked, the user requested help increasing the item count text size on mobile devices.
Mobile Fix Provided:
A media query solution was shared to increase font size for .card-meta .meta>span elements on screens under 768px width, to be added to base.css.
Status: The original button sizing issue appears resolved. The mobile text size solution has been provided but not yet confirmed as implemented or tested by the user.
Hi @Shahil1 , you can follow these steps:
Step 1: Open Online Store → Themes → Edit code.
Step 2: Find component-card.css file
Step 3: Paste this code at the bottom of the file
button.soldoutButton {
position: relative !important;
min-height: 44px !important;
display: flex;
align-items: center !important;
justify-content: center !important;
}
If this is helpful, please let us know by giving us a like and marking it as a solution. Thank you ![]()
Hello @Shahil1 ,
Here are the steps to apply the necessary changes in your Shopify store:
- In your Shopify Admin, navigate to Online Store > Themes > Actions > Edit Code.
- Locate Asset > base.css and paste the following code at the bottom of the file:
button.is-primary.soldoutButton {
min-height: 44px !important;
}
Let me know if you need further assistance!
button.soldoutButton {
position: relative !important;
min-height: 44px !important;
display: flex;
align-items: center !important;
justify-content: center !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
Hi @Shahil1
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
button.is-primary.soldoutButton {
min-height: 44px !important;
}
Best,
Liz
Hello @Shahil1 ,
Here are the steps to apply the necessary changes in your Shopify store:
- In your Shopify Admin, navigate to Online Store > Themes > Actions > Edit Code.
- Locate Asset > base.css and paste the following code at the bottom of the file:
@media screen and (max-width:768px){
.card-meta .meta>span{
font-size:1rem !important;
}
}
Let me know if you need further assistance!




