Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 摆脱固定宽度/流体混合布局中的滚动条_Html_Css_Layout_Fluid Layout - Fatal编程技术网

Html 摆脱固定宽度/流体混合布局中的滚动条

Html 摆脱固定宽度/流体混合布局中的滚动条,html,css,layout,fluid-layout,Html,Css,Layout,Fluid Layout,我的问题可以通过这把小提琴来证明: 标题 导航导航不要尝试表格。这是您案例中的原始结构。对需要固定宽度的td使用宽度属性。其余的两个将平等地分享剩余的空间 <div> <table style="width:100%" border="1"> <thead> <th colspan="4">This is header</th> </thead> <tbody>

我的问题可以通过这把小提琴来证明:


标题

导航
导航
不要尝试表格。这是您案例中的原始结构。对需要固定宽度的td使用宽度属性。其余的两个将平等地分享剩余的空间

    <div>
<table style="width:100%" border="1">
    <thead>
    <th colspan="4">This is header</th>
    </thead>
    <tbody>
    <tr>
    <td width="10%">col1</td>
    <td width="20%">col2</td>
    <td>col3</td>
    <td>col4</td>
    </tr>
    </tbody>
</table>
</div>

这是标题
可乐
可乐
可乐
可乐

谢谢您的回答。我不想使用表格,因为它不是我要显示的表格数据:-)不过我认为这是最后的选择。
    <div>
<table style="width:100%" border="1">
    <thead>
    <th colspan="4">This is header</th>
    </thead>
    <tbody>
    <tr>
    <td width="10%">col1</td>
    <td width="20%">col2</td>
    <td>col3</td>
    <td>col4</td>
    </tr>
    </tbody>
</table>
</div>