After extensive research, I am turning to stackoverflow for help with a seemingly simple task that has proven difficult to achieve. I have three columns of expandable content and need them to adjust in size proportionally when one or more are expanded. Each column should have a maximum and minimum width set as either percentages or static values to prevent excessive squashing when expanding. The example code I attempted did not work due to max-width percentage limitations on table cells.
<table width="100%"><tr>
<td style="min-width:200px; max-width:60%;">Col1ExpandableContent</td>
<td style="min-width:200px; max-width:50%;">Col2ExpandableContent</td>
<td style="min-width:200px; max-width:40%;">Col3ExpandableContent</td>
</tr></table>
To address this issue without the use of frameworks or jQuery, I created a script that dynamically adjusts the maximum width of each column based on the container's width. This approach allows for smooth resizing transitions without relying on JavaScript. While this solution works for now, I am open to alternative methods that meet the specified requirements and possibly offer animated size transitions or further explanation of why percentage max-width does not work with TDs.