I am in need of a div that contains text spanning multiple lines, with both a fixed width and a maximum height. Currently, I have applied the CSS property overflow: hidden;
. However, my issue arises when the last line of text exceeds the maximum height of the div and gets cut off (only showing half of the line). Ideally, I would like to hide this overflow and replace it with an ellipsis on the last visible line.
The challenge is not adding ellipsis to a single line of text (which can be achieved using white-space: nowrap
), but rather ensuring that the last line is fully displayed without being truncated. If necessary, I am open to utilizing jQuery to help insert the ellipsis as needed.