Solution 1 :

There’s a way to do it using unofficial line-clamp syntax, and
starting with Firefox 68 it works with all major browsers.

.item_list_text {
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-box-orient: vertical;
   -webkit-line-clamp: N; /* number of lines to show */
}
body {
   margin: 20px;
}

.item_list_text {
  overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 3; /* number of lines to show */
   -webkit-box-orient: vertical;
}
<div class="item_list_text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam consectetur venenatis blandit. Praesent vehicula, libero non pretium vulputate, lacus arcu facilisis lectus, sed feugiat tellus nulla eu dolor. Nulla porta bibendum lectus quis euismod. Aliquam volutpat ultricies porttitor. Cras risus nisi, accumsan vel cursus ut, sollicitudin vitae dolor. Fusce scelerisque eleifend lectus in bibendum. Suspendisse lacinia egestas felis a volutpat.
        </div>

Unless you care about IE users, there is no need to do line-height and max-height fallbacks.

Problem :

Where i am listing the products, i dont want to show the full lead of them, so now i cut it off with max-height:90px.

Its working, but how can add some …-after the text end? I tryed text-allipsis and white space no-wrap, but in that version, only 1 row text was showned, and not 4.

My code now for the text:

.item_list_text{max-height:90px;overflow:hidden;}

enter image description here

Comments

Comment posted by minimal reproducible example

Please create a

Comment posted by Manikandan2811

Do u want the paragraph tag has one line right?

Comment posted by hackingui.com/front-end/…

hackingui.com/front-end/…

Comment posted by Tibi458

Thanks, its great! Can i use this on

tags on the product title?

Comment posted by Awais

@Tibi458 Yes on any tag. n Please accept answers if that helps you

By