I am trying to align my image on the right, but it is not working.
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="media">
<img class="d-flex mr-3 img-thumbnail float-right" src="https://picsum.photos/200/100" alt="grand-buffet">
<div class="media-body">
<h2 class="mt-0">Weekend Grand Buffet <span class="badge badge-danger">NEW</span></h2>
<p class="d-none d-sm-block">Featuring mouthwatering combinations with a choice of five different salads, six enticing appetizers, six main entrees and five choicest desserts. Free flowing bubbly and soft drinks. All for just $19.99 per person </p>
</div>
</div>
3
Answers
I fixed this issue by replacing mr-3 with ml-3 and float-right with order-3
Visit the following link for further details https://getbootstrap.com/docs/4.4/utilities/flex/#order
Try replacing
float-right
withml-auto
in your img tag like below:Add
order-1
toimg
(Build-inproperty
= minimal code):.order-1
CSS: