I've encountered a coding challenge while working with Bootstrap 5:
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5e3c31312a2d2a2c3f2e1e6b706e706c">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<br><br>
<div class="list-group-item d-flex flex-row">
<div class="flex-column">
<h4>A Test Recipe</h4>
<p>This is simply a test</p>
</div>
<div class="flex-row align-self-center justify-content-end">
<img src="https://cdn.pixabay.com/photo/2016/06/15/19/09/food-1459693_1280.jpg"
alt="A Test Recipe"
style="max-height: 50px !important">
</div>
</div>
I'm struggling to position the image at the end of the list-group-item
div. I have attempted using justify-content-end
, but it doesn't seem to work. I also tried align-self-end
, but it didn't move the image to the right side.
Additionally, for the div with the flex-column
class, I want to vertically center its content. However, my attempts have been unsuccessful so far. The goal is to have it centered just like the image is. While I managed to vertically center the image using the align-self-center
class, applying this class to the div with the flex-column
class doesn't yield the desired result.
What could be causing these issues?