How to limit webpage titles to two lines only?

Mitesh3
Excursionist
79 0 12

Title should be only in 2 line if it's more than two line than Dots will come 

URL https://houseofsneakers.in/

Screenshot_2023-12-30-01-12-08-89_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

Replies 2 (2)
Mitesh3
Excursionist
79 0 12

I am pasting same code in this website hypestockexchange.in but it's not working in this website can solve it??

PageFly-Henry
Astronaut
1074 308 262

Hi @Mitesh3 

This is Henry from PageFly - Landing Page Builder App

 

You can try this code by following these steps: 

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: paste bellow code in tag </body> -> save.

PageFlyHenry_0-1704512054934.png

 


<style>
@media (max-width: 767px){

.grid-product__title.grid-product__title--body {

    display: -webkit-box !important;

    -webkit-box-orient: vertical;

    overflow: hidden;

    -webkit-line-clamp: 2;

}}

</style>

Hope that my solution works for you.

Best regards,

Henry | 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.