When you have a toolbar with a few buttons and a drop down, like this one:
<div class="container">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group"><a class="btn btn-default" role="button" href="">Invite People</a></div>
<div class="btn-group"><a class="btn btn-default" role="button" href="">Create Campaign</a></div>
<div class="btn-group"><a class="btn btn-default" role="button" href="">Edit</a></div>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Action <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
</ul>
</div>
</div>
</div>
How do you properly align it right? I tried pull-right on the toolbar as well as the button groups as well as one button group with pull-right containing all the buttons. None of those worked.
Using .align-self-end is used to align a single item in a Flexbox to the right.
If you want to move the button to the right, you can also place the button within a <div> element and add the text-align property with its "right" value to the "align-right" class of the <div>.
Bootstrap allows us to align elements by using the utility class float. As we want to align the button to the right side of the text box, we have to use the float-right class.
Try like this: DEMO
<div class="container">
<div class="btn-toolbar pull-right" role="toolbar">
.....
</div></div>
Bootstrap pull-right
is working fine here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With