Applying a fixed width to <td> elements should work. If it doesnβt work for you, there may be a style overriding the style you specified, or you have a syntax error in your CSS. Have you forgotten units (e.g. px, em)? Use Firebug (or a similar tool) to determine which styles are applied / overridden. Generally, something similar to this should work:
td { width: 200px; }
I do not know if this is possible for your codebase, but another option is to specify a single table with several <tbody> elements. Like this:
<table> <tbody><tr> <td>Col 1 Table 1</td> <td>Col 2 Table 1</td> <td>Col 3 Table 1</td> </tr></tbody> <tbody><tr> <td>Col 1 Table 2</td> <td>Col 2 Table 2</td> <td>Col 3 Table 2</td> </tr></tbody> </table>
Any markup displayed between your 2 tables should also be part of a large table. You can place this content in the third <tbody> element containing only one row and one cell, if necessary. Again, I'm not sure how well your code base can succumb to this refactoring, but I put it there as an option.
Asaph
source share