I'm using bootstrap 5in an MVC application and trying to align text to bottom left. The text should be aligned to bottom left when you hover over a card to see extra info. However I try I can't seem to make it work.
@for (var j = 0; j
< 3 && i + j < arrivaltestresult.Count; j++) { <div class="col-4 p-0 text-center">
<div class="card">
<img src="https://via.placeholder.com/350x350" class="card-img-top" alt="...">
<div class="card-body text-light text-start text-left bottom-align-text">
<div class="display-flex">
<h5>@arrivaltestresult[i+j].Name</h5>
<div class="extra-info mt-auto">
<p>@arrivaltestresult[i+j].Category</p>
<p class="@(@arrivaltestresult[i+j].DiscountPrice > 0 ? " text-decoration-line-through " :"d-none ")">@arrivaltestresult[i+j].Price</p>
<p class="price-text">@(@arrivaltestresult[i+j].DiscountPrice > 0 ? @arrivaltestresult[i+j].DiscountPrice: @arrivaltestresult[i+j].Price)</p>
</div>
</div>
</div>
</div>
</div>
first = false; }
I've added a picture to show how it looks currently.
style="margin-left:0px;margin-botton:0px"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.