When buttons shift to second line, they are attached to eachother and not looking good, i want to put space between buttons horizontally.
<div class="container">
<div class="tim-title">
<h3>What intrests you?</h3>
</div>
<button type="button" class="btn btn-outline-danger btn-round" placement="right"
ngbPopover="Here will be some very useful information about this popover." popoverTitle="Popover on right">
Artificial Intelligence
</button>
<button type="button" class="btn btn-outline-danger btn-round" placement="top"
ngbPopover="Here will be some very useful information about this popover." popoverTitle="Popover on top">
Management
</button>
<button type="button" class="btn btn-outline-danger btn-round" placement="left"
ngbPopover="Here will be some very useful information about this popover." popoverTitle="Popover on left">
Data Science
</button>
<button type="button" class="btn btn-outline-danger btn-round" placement="bottom"
ngbPopover="Here will be some very useful information about this popover." popoverTitle="Popover on bottom">
FInance
</button>
<button type="button" class="btn btn-outline-danger btn-round" placement="right"
ngbPopover="Here will be some very useful information about this popover."
popoverTitle="Popover on right">
Human Resource
</button>
</div>
4
Answers
One solution is to simply put a
<br>
element between the buttons.Another solution would be to put a horizontal margin between buttons. If you are using Bootstrap, the class
my-3
might be useful to achieve this.For more info about margin on Bootstrap, here is the official guide: https://getbootstrap.com/docs/4.5/utilities/spacing/
just add padding using
put this inside the button you want to move left
EDIT:
you are using bootstrap so add m-3 to every button to every button on the page so they are spaced out on all sides.
ok so if this is the first row of buttons then do this:
To each button add mb-3 class (as stated in previous comments) and I would also add mr-3 class (or mr-2) instead of the
(it’s just nicer practice and usage of bootstrap).like this: