html - Bootstrap Collapse Navbar - Pulling Text Left -
so... when navbar on desktop or laptop screen want text pulled right have done, when viewing website phone collapse navbar. when navbar collapsed text pulled left instead of right can't find way it.
i've tried text-align aligns text whereas want being pull left when shown on phone screen.
<!-- navbar --> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2" aria-expanded="false"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">web designs</a> </div> <div class="navbar-collapse collapse" id="bs-example-navbar-collapse-2" aria-expanded="false" style="height: 1px;"> <ul class="nav navbar-nav pull-right"> <li><a href="#">home</a> </li> <li><a href="#">projects</a> </li> <li><a href="#">contact</a> </li> </ul> </div> </nav> <!-- /.end of navbar -->
when add pull-right class floats element right...so in order make appear on left hand side on smaller devices should target desired device width , float left, this:
@media screen , (max-width: 767px) { .navbar-nav { float: left !important; } }
this should work :)
Comments
Post a Comment