With Python, I am creating an HTML page that contains multiple tables with the same number of columns, all holding the same type of data. While the generated page is functional, I would like to improve readability by ensuring that all tables have the same width. Currently, each table either has a different width or experiences text overflow in the columns.
To address this issue, I have added custom CSS styles to set fixed widths for each column in the tables. However, manually setting these widths for each column is not a scalable solution.
I am now looking for a dynamic solution to ensure that all tables have consistent column widths based on the widest column found across any of the tables. This would involve setting the width of columns like "Test Case Name" and "Owner" to match the widest instance of those columns among all tables.
If you look at the provided example, you will notice discrepancies in the widths of the tables and their respective columns. My objective is to create a script, potentially using JavaScript, that calculates the appropriate column widths dynamically instead of statically defining them in the CSS.
I have attempted to implement some solutions found online but have not achieved the desired result due to the complexity of my table structure. Any assistance or guidance on how to achieve this dynamic column sizing would be greatly appreciated. Thank you.