I have a table that has cells of variable widths and heights set by percentage and I want to have the text truncated like it is with text-overflow: ellipsis; but I want the text to fill my cell with multiple lines until it runs out of space.
.cell {
background: green;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
I've prepared an example on jsFiddle: http://jsfiddle.net/QEL2G/22/
In the example, I want the green box to have three lines of text (doesn't HAVE to end in [...]) but not all of the Lorem ipsum if it can't fit into the size allotted.
If you take out the white-space: nowrap; it will stop truncating it after the first line, but then it seems to have no regard for the height of the cell and will not truncate at all.
I've tried many different things, in fact there is a very simple answer if I wanted to define a static size to the cell... but that isn't the case.