Shopify themes, liquid, logos, and UX
Hello,
Is there any way to limit the product titles in my collection page to just one line and have a "..." at the end if there is more?
https://stronos.shop/
Pass: GWR
Hi @Kogun1
Do you mean like this?
If it is, check this one.
From your Shopify admin dashboard, click on "Online Store" and then "Themes".
Find the theme that you want to edit and click on "Actions" and then "Edit code".
In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
div#shopify-section-collection_page h3.product-title.pr.fs__14.mg__0.fwm {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
And Save.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Hello, I added this code at the bottom of my style.css file. However, it still does not limit the title.
Check this one again. Thanks!
.nt_pr h3.product-title {
overflow: hidden;
white-space: nowrap !important;
text-overflow: ellipsis !important;
}
And save.
Hey, thanks for the follow-up. However, this code is still not fixing the issue. Would you possibly want collaborator access? Thanks!
Hi @Kogun1
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
<style>
.product-info__inner h3.product-title {
display: -webkit-box;
line-height: 1.3;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
margin-top:10px;
}
</style>
Hope this can help you solve the issue
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025