GTBond
April 1, 2021, 9:57am
1
Hello, I’d like to limit the names of products in my store to 2 lines in the catalog page.
I was able to limit the titles on the homepage using @Michael_Pink ’s code below, but now I’d like to do the same on the catalog page
.template-index [data-section-type="collection-row-section"] .product-grid-item p {display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;}
My site url is https://gadzone.co
Kindly assist, thanks
1 Like
Please place this code at the end of theme.scss
.product-grid-item p {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical;
}
2 Likes
GTBond
April 1, 2021, 2:24pm
3
Thanks you! It worked for even for the homepage so I deleted the other code
1 Like
Thank you for the update.
Hi Expert,
Can you help me?
I want my title on collection page also have 2 lines only.
my theme is kalles
dongmanwangguo.shopify.com
password draoly