Limit text length to n lines using CSS
There’s a way to do it using unofficial line-clamp syntax, and starting with Firefox 68 it works in all major browsers. body { margin: 20px; } .text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; /* number of lines to show */ line-clamp: 2; -webkit-box-orient: vertical; } <div class=”text”> Lorem ipsum dolor sit amet, … Read more