I have some trouble with a drop-down menu (Bootstrap 4). So I have a table:
When I'm clicking on settings in first row I have a drop-down:
But when I'm clicking on settings in second row, I have a drop-down in same place as the first. How I can solve it?
Here is a codepen same troubles there: CodePen
HTML:
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr>
<th>Фио сотрудника</th>
<th>Должность</th>
<th>Телефон</th>
<th>Ломбард</th>
<th>Профиль доступа</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td class="tflex">
<span class="default-av">hC</span>
<span>Тарнавский Дмитрий Алексеевич</span>
</td>
<td>Разработчик</td>
<td>+7 (921) 030-33-32</td>
<td>Южный</td>
<td>Администратор</td>
<td align="center">
<div class="dropdown">
<a class="btn btn-secondary" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="far fa-cog"></i>
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</td>
</tr>
<tr>
<td>Разработчик</td>
<td>Moe</td>
<td>+7 (921) 030-33-32</td>
<td>Dooley</td>
<td>+7 (921) 030-33-32</td>
<td align="center">
<div class="dropdown">
<a class="btn btn-secondary" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="far fa-cog"></i>
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action2</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>