Related Tags:
HTML Hypertext Markup Language, a standardized system for tagging text files to achieve font, colour, graphic, and hyperlink effects on World Wide Web pages. Learn More, CSS (Cascading Style Sheets) CSS stands for Cascading Style Sheets. CSS describes how HTML elements are to be displayed on screen, paper, or in other media. CSS saves a lot of work. It can control the layout of multiple web pages all at once. External stylesheets are stored in CSS files. Learn More,

is it possible to limit text to specified N number of lines using css?

Description:I wanted to limit text to let say 3 lines and all the text exceeding 3 lines should be cropped or hidden and content should show … at the end of the content/text, is it possible through css

Posted by: | Posted on: Dec 20, 2021

1 answers



yes, it is possible through css and you can use following css class to limit/crop your text exceeding 3 lines

overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;

Replied by: | Replied on: Dec 21, 2021


Code block Hyperlink bold Quotes block Upload Images