I have a situation where I need to wrap my text into 2 lines only. It should not be wrapped more than 2 lines.
Is there any css available for this?
If not can this be done using jQuery?
I have a situation where I need to wrap my text into 2 lines only. It should not be wrapped more than 2 lines.
Is there any css available for this?
If not can this be done using jQuery?
Have a look at the three dots jquery plugin once: http://tpgblog.com/threedots/
It restricts the text to display only in two lines and it overrides the remaining text and instead of that it would display ellipsis.
Similar to the : Wrap a text within only two lines inside div
Without seeing your code, it is little difficult to say for "wrap a text in 2 lines". Since it also depends upon the height and width of your element.
<div style="word-wrap: break-word; width: 200px; border: 1px solid #ccc;" >
Wrap a text in 2 lines only using jQuery or CSS
</div>