如何让这些桌子在没有额外空间的情况下相互滑动?如何让这些表格堆叠在一起?
<table border="0">
<tbody>
<tr>
<th>And another</th>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<th>And another</th>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<th>And another</th>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<th>And another</th>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
<tr>
<td>Some stuff in the table. </td>
</tr>
</tbody>
</table>
CSS
/* ---------------[ Tables ]--------------- */
table {
float: left;
width: 285px;
}
tr, td, th {
margin:auto;
}
td, th {
padding:5px;
vertical-align:top;
}
th {
font-weight:bold;
background:#ddd;
}
td {
border:1px solid #ddd;
}
感谢
一定要添加,你希望这些表在两列。它没有在你的问题中指出,虽然考虑到图片我相信你明白你想要完成的。目前,你从我认为误解了问题的人那里得到了很多答案。 – zzzzBov