I am using the Media Object of Boostrap 4 for a comments module, I have added a button in it but I do not know how I can align it horizontally so that it sticks to the right margin.
The desired result is the button in that position:
.single-comment{
border: 1px solid lightgray;
padding: 15px;
border-radius: 5px
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="media mb-4 single-comment"><img class="d-flex mr-3 rounded-circle" src="http://placehold.it/50x50" alt="">
<div class="media-body">
<h5 class="mt-0">Padre1</h5>
<p>padre1</p>
<button type="button" class="btn btn-primary btn-sm align-self-end mt-4">Responder</button>
<div class="media mt-4"><img class="d-flex mr-3 rounded-circle" src="http://placehold.it/50x50" alt="">
<div class="media-body">
<h5 class="mt-0">Hijo</h5>
<p>hijo</p>
</div>
</div>
</div>
</div>