You can use display:flex attribute for design items side by side. And for table you can use tr td th elements . Additionally you i used justify-content:start-center-end attributes Finally You should give width:auto value to the box classes
.box1 {
display:flex;
justify-content:start;
width:auto;
}
.box2 {
width:auto;
display:flex;
justify-content:center;
}
.box3 {
width:auto;
display:flex;
justify-content:end;
}
table, th, td {
border:1px solid black;
}
.container {
display:flex;
justify-content:space-around;
}
<div class="container">
<div class="box1">
<p>hello</p>
</div>
<div class="box2">
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
</div>
<div class="box3">
<p>Hello again</p>
</div>
</div>