这是我的网页的外观:下一个移动表到图像
-------------
-------------
Image here
-------------
-------------
Table1 here
Table2 here
Table3 here
我希望,使它看起来像这样:
-------------
-------------
Image here Table1 here
-------------
-------------
Table2 here Table3 here
HTML:
<img class="image" src="somesrc">
<table id="table-1">
<tbody>
<tr class="row-1">
<td class="column-1">something</td><td class="column-2">something</td>
</tr>
<tr class="row-2">
<td class="column-1">something</td><td class="column-2">something</td>
</tr>
The same for the other 2 tables but with different ID
CSS:
.image {
height: auto;
width: 250px;
}
#table-1, #table-2, #table-3 {
width: 40%;
font-weight: bold;
}
#table-1 .column-1, #table-2 .column-1, #table-3 .column-1 {
background-color: #000000;
color: #fff;
width: 40%;
}
我不知道如何将table1移动到所需的位置。每张桌子上面都有一个标题。
有你的HTML没有图像。 –
欢迎来到Stack Overflow!寻求代码帮助的问题必须包含在问题本身中重现**所需的最短代码**最好在[** Stack Snippet **]中(https://blog.stackoverflow.com/2014/09/introducing-runnable) -javascript-CSS-和HTML的代码段/)。请参阅[**如何创建最小,完整和可验证示例**](http://stackoverflow.com/help/mcve) –
我添加了图像的HTML和css – Stew