I’ve got a basic nav-tabs
in Twitter Bootstrap and I’ve got an image after all of my tabs, that I’d like to float right. I’ve tried modifying its float, text-align, and other attributes, and even the pull-right
class as mentioned on a separate but related SO question.
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="stuff-tab" data-toggle="tab" href="#stuff" role="tab" aria-controls="stuff" aria-selected="true">Stuff</a>
</li>
<!-- ... -->
<img class="pull-right text-right float-right" src="myimg.png" width="32px" height="32px">
What Bootstrap class or CSS should I write to make my image float to the right?
(Bootstrap 4 if that matters)
2
Answers
Put a div tag around the image and use d-flex justify-content-end like this:
I tested this. Should work.
Another you can try: