i am trying to use justify-content to put one button at the beginning of a div and another button at the end,
but i noticed that justify content is only working if called on the div not the btn itself, so below is what i have written which i know does not work.
any tips would be highly appreciated
<!DOCTYPE html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.js"></script>
<title>Container justify</title>
<div class="d-flex justify-content">
<button class="btn justify-content-start btn-default">button1</button>
<button class="btn justify-content-end btn-default">button2</button>
</div>
2
Answers
You can do this in a more used manned using inline-block elements as follows:
You can change the classes in you html page if needed, I just used the ones you had provided.
You need to use the correct classes on the parent, in this cae
.justify-content-between
.Bootstrap 4 Layout Utiltites