I have a table where the cells' width is in percentage and I want to use text-overflow: ellipsis
to hide long lines of text:
In the example the ellipsis works fine in a div but not in the cell. It still grows and ignores both width:60%
and max-width:60%
.
If I add a display:block
to the cell, the text does stop at 60% and gets the ellipsis, but the total width of the cell is still the size of the whole text.
Ultimately, I want the table to fit the screen. Is there a way to do it with pure css?