'Alignment in Twitter Bootstrap 3 navbar toggle
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 -->
Solution 1:[1]
Use 'pull-right' into the class string and let bootstrap arrange the buttons.
For more information you check Helper classes
Solution 2:[2]
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;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Imran Rashid |
| Solution 2 | eyllanesc |
