How can the fixed column width could be respected even when the strings are too long?
The thing is that I want to present a report in a jsp, but I separate the headers in a table and the content in another table, giving them both the same width to its columns. The problem is that the text in several columns is too long, so I want to know if it is possible to simply truncate the String to avoid the column from getting bigger.
I would appreciate your help.
You could try text-overflow: ellipsis:
td {
white-space: nowrap;
overflow: hidden; /* "overflow" value must be different from "visible" */
text-overflow: ellipsis;
}
Warning: Older versions of IE do weird things if you don't set explicit widths on your columns,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With