I am utilizing a while loop to showcase various groups of people in different tables.
I have discovered that when I use inline-block
, the margin auto
function does not work.
I would like these two tables to be displayed inline and centered in the browser window.
Below is my code:
<table style="display: inline-block; margin: auto;" class="table table-striped table-bordered" >
<thead>
<tr>
<th colspan="2">
Manager Group 2
</th>
</tr>
<tr>
<th>Manager Name</th>
<th>User Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>Kelvin</td>
<td><a href="admin_edit.php?id=<?php echo $mrow["id"]; ?>" >User Details</a></td>
</tr>
</tbody>
</table>
<table style="display: inline-block; margin: auto;" class="table table-striped table-bordered" >
<thead>
<tr>
<th colspan="2">
Manager Group 1
</th>
</tr>
<tr>
<th>Manager Name</th>
<th>User Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>James</td>
<td><a href="admin_edit.php?id=<?php echo $mrow["id"]; ?>" >User Details</a></td>
</tr>
</tbody>
</table>