Alignment in Twitter Bootstrap 3 navbar toggle

7.7k views Asked by At

I can't find any classes to right align collapse menu of navbar toggle in bootstrap 3. Is there anyway like hooking css to do that? Here is the code mention that I need right align menus! CesaStack Toggle navigation

  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse" id="bs1">
      <ul class="nav navbar-nav navbar-right">
          <li><a href="/contact">goto right</a></li>
          <li><a href="#">goto right</a></li>
          <li><a href="#">goto right</a></li>
      </ul>
      <form class="navbar-form navbar-left" role="search">
          <div class="form-group">
              <input type="text" class="form-control text-right" placeholder="جست و جو">
          </div>
          <button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i></button>
      </form>
  </div><!-- /.navbar-collapse -->

2

There are 2 answers

2
Imran Rashid On

Use 'pull-right' into the class string and let bootstrap arrange the buttons.

For more information you check Helper classes

http://getbootstrap.com/css/#helper-classes

0
jonasdev On

The collapsible navbar button is float:right by default

Simply float:left and adjust the margins.

Add this to the bottom of your custom CSS.
NOTE: Don't modify the Bootstrap source.

/* floats toggled navbar to the left when screen gets small 
-solution by: http://jonasdev.com
*/
.navbar-toggle
{
margin-left:15px;
float:left;
margin-right:0px;
}