How to define cell width for 2 HTML tables with different column counts?

Posted by DaveDev on Stack Overflow See other posts from Stack Overflow or by DaveDev
Published on 2010-05-18T20:51:26Z Indexed on 2010/05/18 21:00 UTC
Read the original article Hit count: 395

Filed under:
|
|

If I have 2 tables:

<table id="Table1">
    <tr>
        <td></td><td></td><td></td>
    </tr>
</table>

<table id="Table2">
    <tr>
        <td></td><td></td><td></td><td></td>
    </tr>
</table>

The first has 3 columns, the second has 4 columns.

How can I define a style to represent both tables when I want Table1's cell width to be 1/3 the width of the full table, and Table2's cells are 1/4 the width of the table?

© Stack Overflow or respective owner

Related posts about html

Related posts about html-table