I'm sure I ought to know the answer to this but I'm struggling...
I have a table with a width of 100% of its parent. That bit is easy.
The first column contains a list of names.
The last column contains percentages to 1 decimal place.
The 20–30 intermediate columns contain just numbers.
This is a template that will be used with a varying number of columns and varying contents, so it needs to be a flexible solution.
I want the first and last columns to have sufficient width to accommodate their contents, but the intermediate columns to share the available width remaining equally. Unfortunately, because some columns might only contain single-digit numbers but others include two-digit or negative numbers, leaving the width alone means that the columns are not equally spaced.
I'm sure I remember reading that there was a trick with width:*; but I can't find any documentation for it and it isn't working when I try applying it to the relevant <th> cells by using a class. Any suggestions?