image showing times and comments not aligned
I'm trying to left align the time and comments in different tables.
<?php
while ($line = mysqli_fetch_array($result, MYSQLI_ASSOC)){
$time = date("H:i", strtotime($line["event_date"]));
$date = date_format($nice_date, "l, jS F");
colours = array("table-active", "table-success", "table-warning", "table-danger", "table-info");
$i = 0;
?>
//Some checking done here to see if new date. If so, start new table.
<h2><?php echo $date; ?></h2>
<div class="container">
<table class="table table-sm">
<tbody>
<tr class=<?php echo $colours[$i % 5]; ?>>
<th scope="row"></th>
<td><div class="text-sm-left" ><?php echo $time;?></div></td>
<td><div class="text-sm-left" ><?php echo $line["comment"];?></div></td>
</tr>
</tbody>
</table>
</div>
<?php
}
?>
The tables print with times and comments which are aligned within a table but not from table to table.
I've tried to use the class "text-sm-left" without its own div. That didn't work. I've tried the class "text-left" also. That didn't work. I've attached an image showing the tables with the times and comments out-of-alignmnet.