I need to display a member with a higher rank, showing the user image along with their username. However, I am struggling to align the image and text properly due to varying username lengths causing them to appear in a zig-zag position.
Here is what I have tried so far:
<table style="width: 100%; table-layout: fixed" class="table table-striped text-center">
<thead class='bg-dark' style='background-color: 3658DE'>
<tr>
<th><img src='../assets/img/gold.png'/>Rank</th>
<th><i class='fa fa-user mr-1' style='color: #F4B806'></i>Members</th>
</tr>
<tr>
<td>
1
</td>
<td>
<div class='text-center'>
<img src='images' alt='user dp' class=' img-fluid rounded-circle' style='height: 30px; width: 30px;' />
<span class='mr-1 '>@$username</span>
</div>
<td>
</tr>
</thead>
<tbody>
Expected output:
Rank Member
1 image Dravid
2 image Richard Nixon
3 image GrahamBell
4 image Mark twains
Output's getting:
Rank Member
1 image Dravid
2 image RichardNixon
3 image GrahamBell
4 image Mark twains