可能重复:
试图让表格彼此水平相邻
我已经创建了两个 html 表。我怎样才能将它们并排放置而不是 1 在另一个之上?
Depending on your content and space, you can use floats or inline display:
<table style="display: inline-block;">
<table style="float: left;">
Check it out here: http://jsfiddle.net/SM769/
Documentation
display
on MDN - https://developer.mozilla.org/en/CSS:displayfloat
on MDN - https://developer.mozilla.org/en/CSS/floatYou can place your tables in a div and add style to your table "float: left"
<div>
<table style="float: left">
<tr>
<td>..</td>
</tr>
</table>
<table style="float: left">
<tr>
<td>..</td>
</tr>
</table>
</div>
or simply use css:
div>table {
float: left
}
<div style="float: left;margin-right:10px">
<table>
<tr>
<td>..</td>
</tr>
</table>
</div>
<div style="float: left">
<table>
<tr>
<td>..</td>
</tr>
</table>
</div>