I've exhausted all my ideas and even searched Google without finding a solution.
<div class="col-md-12">
<div class="card-header text-white" style="background-color:cornflowerblue">
<div class="col">
@if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
{
<a class="text-white float-right" asp-action="Edit" asp-route-id="@item.Id"><i class="bi bi-pencil-square"></i></a>
}
</div>
<div class="col">
<p class="card-text">
<h5 class="card-title">@item.Name</h5>
</p>
</div>
<p class="text-dark">@item.Price.ToString("c")</p>
</div>
</div>
<div class="col-md-6">
My main goal is to make the bi-pencil-square
icon float towards the right edge of the card header. I've tried using Bootstrap's float right
and
style="Margin-Right: 0px"
. I've experimented with setting styles on the a tag, on the enclosing div, and even on the i tag, but nothing has been successful.
Any suggestions from anyone?