I am trying to create a navbar in Bootstrap using a column system and I am having problems that I'm not sure what I am doing wrong.
I would like to get a navigation bar that looks like this:

I need one row with a left aligned column with a logo and a right aligned column with a user button, and then a second row with centered buttons.
My thought was that I could create two divs with the class "col-lg-6 col-md-6", one for the logo and one for the user button. These two will create the first 12 rows of the column that will force the tags to follow the whole new row.
When I try to do this, I end up working inside and not working.

I know I can do this by adding my own CSS code (how I could make the layout of the first screenshot), but I would prefer to stick to the bootstrap column system, so my ad-hoc css doesn't do something up the line . I would also like to understand what I did wrong (this is my first project using bootstrap, so I'm still trying to overcome the learning curve).
Here is my code for this demo page:
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/additions.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="collapse navbar-collapse col-lg-6 col-md-6" >
<ul class="nav navbar-nav navbar-left">
<li><img src="images/genericLogo.png"></li>
</ul>
</div>
<div class="collapse navbar-collapse navbar-right col-lg-6 col-md-6">
<div class="dropdown">
<button id="userMenu" class="btn dropdown-toggle btn-primary" type="button" data-toggle="dropdown">
<span>username@domainName.com </span><span class="caret userButton"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="userMenu">
<li role="presentation"><a href="#" tabindex="-1" role="menuitem">View Details</a></li>
<li role="presentation"><a href="#" tabindex="-1" role="menuitem">Edit</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a href="#" tabindex="-1" role="menuitem">Logout</a></li>
</ul>
</div>
</div>
<div class="collapse navbar-collapse" id="mainNav">
<ul id="navlist" class="nav navbar-nav">
<li><a href="#">Reports</a></li>
<li><a href="#">Account Management</a></li>
<li><a href="#">Messages</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Request a Quote</a></li>
<li><a href="#">MainSite.com</a></li>
</ul>
</div>
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target="#mainNav">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</div>
<div class="container-fluid">
<h1>Test</h1>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-6">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-6">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
<div class="demorow col-lg-1 col-md-2 col-sm-6 col-xs-12">testitem <br />testItem</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
Extra css
.demorow{
background-color:gray;
padding:10px;
border:1px solid black;
}
.navbar .navbar-nav {
display: inline-block;
float: none;
}
.navbar .navbar-collapse {
text-align: center;
}
body {
padding-top: 110px;
}
@media screen and (max-width: 768px) {
body { padding-top: 40px; }
}
.dropdown{
width:100%;
}
.dropdown-menu{
width:100%;
}
.dropdown-menu > li {
text-align:left;
}
Any help would be appreciated.
source
share