css - Align a bootstrap navbar to the right -
i'm trying move navbar right, tried both navbar-right, , pull-right, -
<div class="container" > <h1 align="center"><a href="#">my site</a></h1> <div class="container" > <ul class="nav nav-tabs navbar-right" > <li class="active"><a href="#">tab1</a></li> <li><a href="#">tab2</a></li> <li><a href="#">tab3</a></li> <li><a href="#">tab4</a></li> </ul> </div> <br> hello </div>
so there 2 problems here - grey line underneath tabs shorter, , tabs aren't aligned - want "tab1" rightmost one, , correspondingly "tab4" leftmost one.
i same results navbar-right , pull-right. how can fixed?
thanks!
you can have behavior extending bootstrap.
demo on jsbin: http://jsbin.com/zaniz/1/edit?html,css,output
all did added right-to-left
class <ul>
, css style should be:
.right-to-left li { float: right; }
Comments
Post a Comment