HTML,CSS Word Wrapping

I am creating a social network that let's user posts statuses to their timeline.

When the status shows on their timeline, the username of the person who posted it shows next to the status. The username is on the left and the status is on the right(a few spaces away).

If the status is 5 lines long for example, the other status go down and therefore the username isn't aligned with the right status.

I tried fixing it, but nothing happened.

I don't know how to fix it, can someone help me ?

home.php:

<div class="w3-container">
<h2 style= "word-break: break-word;">
<?php 

include("connect.php");
include("auth_login.php");

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

//Write the query
$sql = "SELECT body FROM posts";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
    echo "<p>".$row['body']. "</p>";

}
} else {
echo "No posts";
}

?>
</h2>

<h3>
<?php

//Write the query
$sql = "SELECT username FROM posts";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
    echo "<p>".$row['username']."</p>";
}
} else {
echo "";
}

$conn->close();

?>
</h3>
</div>

this is the problem I am having :

This might be helpful. I put both of them into divs. Before this i set the container's width to 100%.

Hope it's suitable for you :)

.w3-container {
 width: 100%;
}

.w3-container .left-align {
 width: 50%;
 float: left;
}

.w3-container .right-align {
 width: 50%;
 float: right;
 }
<div class="w3-container">
 <div class="left-align">
<h2 style= "word-break: break-word;">
<?php 

include("connect.php");
include("auth_login.php");

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

//Write the query
$sql = "SELECT body FROM posts";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
    echo "<p>".$row['body']. "</p>";

}
} else {
echo "No posts";
}

?>
</h2>
</div>
<div class="right-align">
<h3>
<?php

//Write the query
$sql = "SELECT username FROM posts";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
    echo "<p>".$row['username']."</p>";
}
} else {
echo "";
}

$conn->close();

?>
</h3>
</div>
</div>

</div>