我一直在使用this,W3 Schools,a stackoverflow page with similar problem讓我的表(在一個div)內嵌到頁面下半年另一個DIV。分割屏幕一半CSS
我想然而,隨着垂直分隔分割我的屏幕右側填充內容是造成左側下沉頁面
左側的唯一內容是PHP但是我覺得這是造成對齊的那部分代碼。
所以看起來是這樣的,但是我希望能夠將內容添加到右側的div沒有它導致左側下拉:
代碼:
.floating-box {
display: inline-block;
width: 45%;
height: 75px;
margin: 0px;
border: 1px solid #73AD21;
}
<div class="floating-box">
<table>
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
<th>Column 5</th>
<th>Column 6</th>
<th>Column 7</th>
<th>Column 8</th>
<th>Column 9</th>
<th>Column 10</th>
<th>Column 11</th>
<th>Column 12</th>
</tr>
</thead>
<tbody>
<?php foreach ($allArray as $key => $value) { ?>
<?php } ?>
</tbody>
</table>
</div>
<div class="floating-box">
<h2>Floating box</h2>
</div>
'vertical-align:top;'? –