Can someone help me with this code snippet I have?
<div class="container">
<div class="border rounded-lg" style="height:500px;">
<div class="ml-2 mt-2">
<h1 class="display-3">@Model.Name</h1>
<!-- Image and pay box -->
<div class="mt-4 container">
<img src="~/Resources/default.jpg" class="" style="height:300px;" />
<div class="d-inline align-top float-right border rounded-lg" style="height:250px;width:250px;">
@if (!Model.OnSale)
{
<h3 class="mt-2 text-nowrap text-center text-warning">@Model.Price</h3>
}
else
{
<div class="row">
<div class="col-2 text-center">
<div class="text-secondary font-italic" style="text-align:center;"><s>@Model.PriceBeforeDiscount</s></div>
<div class="mt-2 text-nowrap text-warning">@Model.Price</div>
</div>
</div>
}
<button class="btn btn-success text-white text-center font-weight-bold w-100 mt-3">
BUY NOW
</button>
I have a model that looks like https://i.sstatic.net/XhW0i.png. How can I center both price texts (the ones on the right) as "text-center" doesn't seem to work for some reason? Any suggestions?