html - How can I display a nav title and static text on the same line so that the text is on the right and title on the left? -


i'm new bootstrap. code looks this:

<nav class="navbar navbar-inverse"> <div class='container-fluid'> <div class="navbar-header"> <?php echo "<a href='index.php' class='navbar-brand'>title</a>"; echo "</div>"; echo "<ul class='nav navbar-nav navbar-right'>"; echo "<li><p class='navbar-text'>(logged in " . $_session['logged_user'] . ".)</p>"; echo "</ul></div></nav>\n"; 

something causing line break between title , text on right. if text link , not static text, displays on same line in w3schools example. removing p tag doesn't help, makes text change color , become impossible read. if extend navbar-header tag encompass static text, moves static text left. want rid of line break. don't want turn text link or button nothing. want text on same line header.

div block level element default take whole width.

just in same line? simple example:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>  <nav class="navbar navbar-inverse">    <div class='container-fluid'>      <div class="row">        <a href='index.php' class='navbar-brand'>title</a>        <ul>          <li>            <p class='navbar-text'>logged in test</p>          </li>        </ul>      </div>    </div>  </nav>

ref of bs v3.3.7 source code:

.nav {   display: flex;   flex-wrap: wrap;   padding-left: 0;   margin-bottom: 0;   list-style: none; }    // navbar nav // // custom navbar navigation (doesn't require `.nav`, make use of `.nav-link`).  .navbar-nav {   display: flex;   flex-direction: column; // cannot use `inherit` `.navbar`s value   padding-left: 0;   margin-bottom: 0;   list-style: none;    .nav-link {     padding-right: 0;     padding-left: 0;   }    .dropdown-menu {     position: static;     float: none;   } } 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -