Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap - Change direction of the navbar

I've using Twitter bootstrap and trying to align the navbars' text to the right, i.e - that the "brand" will appear on the right, and all else to the left of it. (For right-to-left website).

Any ideas how this can be accomplished?

like image 929
Roman Avatar asked Dec 24 '12 13:12

Roman


2 Answers

pull-right and pull-left are default bootstrap classes that can help you achieve that without having to write your own css. For example,

    <div class="navbar pull-right"></div> [equivalent to float:right]
    <div class="navbar pull-left"></div>  [equivalent to float:left]
like image 149
Rajarshi Avatar answered Oct 24 '22 20:10

Rajarshi


Apply float:right to div with class as navbar-inner

<div class="navbar-inner" style="float:right">  

Like

<div class="navbar">
    <div class="navbar-inner">    
        <div style="float:right">
        <a class="brand" href="#">Title</a>
        <ul class="nav">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Link</a></li>
        <li><a href="#">Link</a></li>
        </ul>
    </div>
</div>

Live Demo

like image 22
Ajinkya Avatar answered Oct 24 '22 18:10

Ajinkya