如何增加此表"第1行,单元格1"中的空间?
<html>
<table border="1">
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>
</html>
Run Code Online (Sandbox Code Playgroud)
请点击此处查看图片:http: //img227.imageshack.us/img227/6166/htmln.png
它是否正确:
<table border="1" td.my-cell { padding:100px; }>
<tr>
<td class="my-cell">Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
您可以使用cellpadding或使用css
.cellpadding {
padding-left: 5px;
padding-right: 5px;
}
<td class="cellpadding">Row 1, cell 1</td>
Run Code Online (Sandbox Code Playgroud)
编辑您编辑的帖子错误....执行此操作:
<table border="1">
<tr>
<td style="padding-left: 5px; padding-right: 5px;">Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)