Shopify themes, liquid, logos, and UX
Hello! I'm working on a website and desperately need help changing the number of products displayed per row on mobile view. The website is using a theme called Trademark.
The desktop view is set to display 4 products per row, but the theme doesn't give me an option to change it for mobile. Mobile is currently displaying 1 product per row - I want to change it to display at least 3 products per row on mobile.
Can anyone provide me with custom CSS code to do this?
Here's the preview link for the website: https://nhz2o3te4rd3v2dj-10828686.shopifypreview.com
Solved! Go to the solution
This is an accepted solution.
Hi @nadiamejilla ,
Three item per row is too much on the mobile device. I suggest you to atmost 2 products per row.
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above </body> tag
<style>
@media only screen and (max-width: 1000px) {
.list-products .grid__cell {
width: 33.3%!important;
}
.list-products .grid__cell img {
height: auto!important;
}
}
@media only screen and (max-width: 600px) {
.list-products .grid__cell {
width: 50%!important;
}
.list-products .grid__cell img {
height: auto!important;
}
}
</style>
If you require further help to optimize your store, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
For quick response - Message Me
Increase Xmas sales with BOGO+ Easy Free Gift Upsell. Get 30% OFF for 3 months with code "BFWIZZ30".
This is an accepted solution.
Sorry max-width not min-width
@media only screen and (max-width: 768px) {
.list-products .grid__cell img {max-height: 200px !important;}
.product-item__info {min-height: 200px !important; max-height: 200px !important;}
}
This is an accepted solution.
Hi @nadiamejilla ,
Three item per row is too much on the mobile device. I suggest you to atmost 2 products per row.
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above </body> tag
<style>
@media only screen and (max-width: 1000px) {
.list-products .grid__cell {
width: 33.3%!important;
}
.list-products .grid__cell img {
height: auto!important;
}
}
@media only screen and (max-width: 600px) {
.list-products .grid__cell {
width: 50%!important;
}
.list-products .grid__cell img {
height: auto!important;
}
}
</style>
If you require further help to optimize your store, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
For quick response - Message Me
Increase Xmas sales with BOGO+ Easy Free Gift Upsell. Get 30% OFF for 3 months with code "BFWIZZ30".
Thank you so much - it worked! I now need help tailoring the appearance of the product cards & images in mobile view.
How can I edit the code to achieve the following:
Here's the preview link: https://uq2f4cdfe1q0i4c9-10828686.shopifypreview.com
Thank you!!
Hi,
Add the following code:
@media only screen and (min-width: 768px) {
.list-products .grid__cell img {max-height: 200px !important;}
.product-item__info {min-height: 200px !important; max-height: 200px !important;}
}
I added the code to theme.liquid, but it didn't change anything
This is an accepted solution.
Sorry max-width not min-width
@media only screen and (max-width: 768px) {
.list-products .grid__cell img {max-height: 200px !important;}
.product-item__info {min-height: 200px !important; max-height: 200px !important;}
}
It worked, thank you!!
FYI I had to change the min-height and max-height to 250px to fit the text in the cards properly.
Glad I could help, yes sure you can always play around with the pixels to get your desired height in accordance to your text length.
Have a nice day.
User | RANK |
---|---|
210 | |
166 | |
70 | |
55 | |
53 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023