I have a paragraph that I am attempting to truncate using the bootstrap class text-truncate
. However, the output only shows one line of text.
<p class="text-truncate" style="max-width:300px;">
Resize the browser window to see how its width (max-width) changes at different breakpoints.
</p>
The current output is:
Resize the browser window to see that its wid...
The desired output is:
Resize the browser window to see that its width (max-width)
will change at different breakpoints...
Even when trying inline CSS with -webkit-line-clamp: 2
, the result remains the same. How can I achieve multiple lines while using the bootstrap text-truncate
class?