html - Bootstrap float left automatically in a nav menu -


good day. have code menu:

    <!doctype html>     <html lang="en">         <head>             <title>bootstrap case</title>             <meta charset="utf-8">             <meta name="viewport" content="width=device-width, initial-scale=1">             <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">             <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>             <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>         </head>         <body>              <nav class="navbar navbar-inverse">                 <div class="container-fluid">                     <ul class="nav navbar-nav">                         <li class="active"><a href="#">home</a></li>                         <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">page 1 <span class="caret"></span></a>                             <ul class="dropdown-menu">                                 <li><a href="#">page 1-1</a></li>                                 <li><a href="#">page 1-2</a></li>                                 <li><a href="#">page 1-3</a></li>                             </ul>                         </li>                         <li><a href="#">page 2</a></li>                         <li><a href="#">page 3</a></li>                         <li><a href="#">page 4</a></li>                         <li><a href="#">page 5</a></li>                         <li><a href="#">page 6</a></li>                         <li><a href="#">page 7</a></li>                         <li><a href="#">page 8</a></li>                         <li><a href="#">page 9</a></li>                     </ul>                     <ul class="nav navbar-nav navbar-right">                         <li><a href="#"><span class="glyphicon glyphicon-user"></span> sign up</a></li>                         <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> login</a></li>                     </ul>                 </div>             </nav>           </body>     </html> 

when resize windows, can see, right entry 'login' , 'sign in' wordwrap (because there no space anymore) , stay right. there css way (without javascript) let them move left other entries?

<!doctype html>  <html lang="en">  <head>    <title>bootstrap case</title>    <meta charset="utf-8">    <meta name="viewport" content="width=device-width, initial-scale=1">    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>  </head>  <body>    <nav class="navbar navbar-inverse">    <div class="container-fluid">      <div class="navbar-header">        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#mynavbar">          <span class="icon-bar"></span>          <span class="icon-bar"></span>          <span class="icon-bar"></span>        </button>        <a class="navbar-brand" href="#">websitename</a>      </div>      <div class="collapse navbar-collapse" id="mynavbar">        <ul class="nav navbar-nav">          <li class="active"><a href="#">home</a></li>          <li class="dropdown">            <a class="dropdown-toggle" data-toggle="dropdown" href="#">page 1 <span class="caret"></span></a>            <ul class="dropdown-menu">              <li><a href="#">page 1-1</a></li>              <li><a href="#">page 1-2</a></li>              <li><a href="#">page 1-3</a></li>            </ul>          </li>          <li><a href="#">page 2</a></li>          <li><a href="#">page 3</a></li>        </ul>        <ul class="nav navbar-nav navbar-right">          <li><a href="#"><span class="glyphicon glyphicon-user"></span> sign up</a></li>          <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> login</a></li>        </ul>      </div>    </div>  </nav>      <div class="container">    <h3>collapsible navbar</h3>    <p>in example, navigation bar hidden on small screens , replaced button in top right corner (try re-size window).    <p>only when button clicked, navigation bar displayed.</p>  </div>    </body>  </html>

this sort out problem

or can learn more in click link below know more


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -