<table border="1" width="100%" ID="Table2">
<tr>
<td>100</td>
</tr>
</table>
该代码仍然留在桌子两侧的“英寸”空间。尝试让表格跨越页面的整个宽度。谢谢。html表跨越整个宽度?
<table border="1" width="100%" ID="Table2">
<tr>
<td>100</td>
</tr>
</table>
该代码仍然留在桌子两侧的“英寸”空间。尝试让表格跨越页面的整个宽度。谢谢。html表跨越整个宽度?
尝试(在你的头上<部分>,或现有的CSS定义)...
<style>
body {
margin:0;
padding:0;
}
</style>
您需要将表格的边距设置为0来拉伸整个宽度。或者,您也可以将表格的边距设置为负数。
您的表格可能存在边缘样式继承。尝试表的保证金设置为0:
<table border="1" width="100%" ID="Table2" style="margin: 0px;">
<tr>
<td>100</td>
</tr>
</table>
<table border="1"; width=100%>
为我工作。
仅供参考:
HTML应该是表&宽度:100%。 跨度应该是margin:auto;
此外,它可能是父元素的宽度或边距,一直到正文/ – 2009-02-11 23:22:03