這是我的網頁的外觀:下一個移動表到圖像
-------------
-------------
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