Suppose I have a div
of size 100px x 20px
and text within it set randomly with different lengths i.e. some text sections are long and some are short.
So, when the amount of text is less, then there is blank space within the div. And if there is large amount of text, it overflows.
My objectives
If text is less than the
div
capacity, then thefont-size
of that text will maximize to fit within thatdiv
as much as possible without clipping/ cutting.But if text size is larger than the
div
capacity then I want to truncate text and append...
(3 dots only).