For the mobile version I need to modify the quantity input button size for the single
product page (when you select a product and it opens the button for selecting the quantity is too big)
mohwhi
A user needs to reduce the size of the quantity input box on their Shopify mobile product page, as it appears too large.
Initial Solution:
One responder provided CSS code to be added to the theme.liquid file (above the </body> tag), which successfully reduced the quantity input size.
Follow-up Issue:
The original poster then asked how to reduce both the quantity input and cart sizes on mobile, noting the initial solution didn’t work for this broader request.
Comprehensive Solution:
Another contributor offered more extensive CSS code to be added to the theme’s CSS file (base.css, style.css, or theme.css). This solution includes:
.quantity__button width.price-per-item__container .quantity width.quantity-popover-containerThe discussion includes code snippets and visual examples showing the before/after results. The issue appears resolved with the more comprehensive CSS approach.
For the mobile version I need to modify the quantity input button size for the single
product page (when you select a product and it opens the button for selecting the quantity is too big)
mohwhi
Hey @sosober
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 solve your problem then, don’t forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Thank you! Can i also ask you how to reduce the size of both quantity input and cart on mobile version? Because it does not work
Hi @sosober
Check this one.
.quantity__button {
width: calc(2.5rem / var(--font-body-scale));
}
.price-per-item__container .quantity {
width: calc(8rem / var(--font-body-scale) + var(--inputs-border-width) * 2) !important;
}
@media screen and (min-width: 990px) {
.quantity-popover-container {
width: 10rem !important;
}
.quantity-popover-container .quantity {
width: calc(8rem / var(--font-body-scale) + var(--inputs-border-width) * 2) !important;
}
}
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!