如何创建一个包含两列的表,第一个宽度为Auto,第二个宽度为100%

Jos*_*ose 2 html html-table

在表格中:

如何设置列的宽度以实现以下内容:

两列,第一列的宽度适合内容的最大宽度.并且第二个的宽度是表格宽度的其余部分.

ata*_*ini 5

<style type="text/css">
    table, 
    td.col2 {width:100%}
    td.col1 {white-space:nowrap;}
</style>

<table>
    <tr>
        <td class="col1">Column 1 content here</td>
        <td class="col2">Column 2 content here</td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)