I need help with creating a list where each item has a dynamic length. The maximum amount of lines for each item should be 2, and if the text overflows those 2 lines, it should end with dots. I know that using "white-space: nowrap;" can prevent wrapping, but how do I specify the 2 line limit? Any suggestions would be greatly appreciated.example
li {
line-height: 25px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100px;
border: 2px solid #ff0000;
}
<ul>
<li>long long name</li>
<li>long long name long long name</li>
<li>long long name long long name long long name</li>
</ul>