我有一些非常基本的html:
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<table>
<tr>
<th>Addressed to</th>
<th>Sender</th>
<th>Price</th>
<th>Comments</th>
</tr>
<tr>
<td>Joe smith</td>
<td>Ralph Lauren</td>
<td>$200</td>
<td>Lorem ipsum dolor sit amer</td>
</tr>
<tr>
<td>Joe smith</td>
<td>Ralph Lauren</td>
<td>$200</td>
<td>Lorem ipsum dolor sit amer</td>
</tr>
</table>
<p>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
现在,我想在表格行和列之间添加间距,所以我添加了这个 css:
table {
border-collapse: separate;
border-spacing: 20px 10px;
}
伟大的。除了现在表格本身不再与 2 段齐平。
我的问题是表格如何获得所需的间距而不是缩进,或者如何应用最少的 CSS 来克服缩进?