I need to align bootstrap 3 tabs to right instead of left.
Is it possible with usage of bootstrap css or do I need to use custom css ?
Use the . nav-justified class in Bootstrap to center tabs in Bootstrap.
Simply add text-align: center to main , and then reset it all on section using text-align:left . It will affect inline-block elements, but not your section being block , though as descendants might inherit it, the reset will take care of that. Save this answer.
ml-auto class in Bootstrap can be used to align navbar items to the right. The . ml-auto class automatically aligns elements to the right.
Possibly the most common style of navigation in mobile apps is tab-based navigation. This can be tabs on the bottom of the screen or on the top below the header (or even instead of a header).
Use the class .navbar-right
to push an element to the right within a navbar, or .pull-right
to do the same when not in a navbar.
<ul class="nav nav-tabs navbar-right"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Tab1</a></li> <li><a href="#">Tab2</a></li> </ul>
Good to know the other helper-classes here too: http://getbootstrap.com/css/#helper-classes
use pull-right class:
<ul class="nav nav-tabs"> <li class="active pull-right"><a href="#">Home</a></li> <li class="pull-right"><a href="#">Tab1</a></li> <li class="pull-right"><a href="#">Tab2</a></li> </ul>
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