Note: I'm using a rendering engine to render my html to PDF that disables
JavaScriptby default, so I'm strictly looking for answers using*.css.
In my report I have a table used for accounting purposes with 11 columns:
- 1st column is for the counter (e.g.
1.,2., up ton.) that can range up to 3 digits. - 2nd column is for the 12 digit reference number.
- 3rd column is for Address of the reference number on the previous column, that can be empty or at least 50 characters long.
- 4th to last column contains amount/currency/price data minimum value is
0.00and the maximum can vary up to 8 digits with comma separated number grouping.
Now let's say the table's width needs to be 1024px (varies depending on the requirement provided by the *.pdf rendering engine). On that point, I want to:
- Automatically make 1st, 2nd, 4th to last column to compute their width based on their content (that makes same reports to have different column widths depending on the longest column content on the time of generation).
- The 3rd column will adjust accordingly to the remaining width left from the original 1024px and add ellipsis to the end of the line in case of overflow (important).
I tried to give each columns fixed width (with a total of 1024px), and I manage to use the ellipsis overflow through *.css but some space are wasted and I want to avoid these:
