Re: limit product title on collection page?

How can I limit product titles to one line on my collection page?

Kogun1
Excursionist
29 0 5

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

Replies 5 (5)

Made4uo-Ribe
Shopify Partner
6828 1630 2010

Hi @Kogun1 

Do you mean like this? 

Made4uoRibe_0-1705187028147.png

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!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
Kogun1
Excursionist
29 0 5

Hello, I added this code at the bottom of my style.css file. However, it still does not limit the title. 

Made4uo-Ribe
Shopify Partner
6828 1630 2010

Check this one again. Thanks!

.nt_pr h3.product-title {
    overflow: hidden;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

And save. 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
Kogun1
Excursionist
29 0 5

Hey, thanks for the follow-up. However, this code is still not fixing the issue. Would you possibly want collaborator access? Thanks!

PageFly-Richard
Shopify Partner
4394 1005 1657

 

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!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.