I've been using this, W3 Schools, a stackoverflow page with similar problem to make my table (in a div) inline to another div on the second half of the page.
I'm trying to split my screen with a vertical divide however as the right side is populated with content it is causing the left side to sink down the page
The only content on the left side is a PHP populated table but I feel it's that part of the code which is causing the alignment.
So looks something like this however I want to be able to add content to the right side div without it causing left side to drop down:
Code:
.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>