Shopify themes, liquid, logos, and UX
the product title on collection page is fully presented and I will want it to be display only one row without changing font size. it will end with "..." if the title exceeds one row. Here is my website: https://jonvidesign.com/ and attached photo is what I want.
Solved! Go to the solution
This is an accepted solution.
Hello @momo110
.card__heading a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 350px;
width: 100%;
}
I hope this helps!
Thanks
This is an accepted solution.
Add This css In you edit Code > base.css file
.card__heading a {
display: -webkit-box;
-webkit-line-clamp: 1;
max-width: 350px;
text-overflow: ellipsis " [..]";
-webkit-box-orient: vertical;
overflow: hidden;
}
Try This Code This Code Work On Mobile Also
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
Contect On My Mail :-Mail@gmail.com
This is an accepted solution.
Hello @momo110
.card__heading a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 350px;
width: 100%;
}
I hope this helps!
Thanks
Hello sir, it works on pc device but it seems that something is wrong on mobile. kindly check
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
@media screen and (max-width: 767px) {
.card__heading a {
max-width: 26% !important;
}
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
it looks not long enough and also affects price position, pls have a look
This is an accepted solution.
Add This css In you edit Code > base.css file
.card__heading a {
display: -webkit-box;
-webkit-line-clamp: 1;
max-width: 350px;
text-overflow: ellipsis " [..]";
-webkit-box-orient: vertical;
overflow: hidden;
}
Try This Code This Code Work On Mobile Also
If you require further help to optimize your store, please don’t hesitate to reach out.
This contribution will always benefit you and you will get my full help easily and you can contact me easily.
Contect On My Mail :-Mail@gmail.com
Hello @momo110
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.collection h3.card__heading.h5 a {
width: 100%;
max-width: 69%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025