I want my navbar to span the entire width like this www.ramenchicago.com but right now i can only get it all on the right.
I have my css set up like this
.navbar-wrapper > .container {
padding-right: 0;
padding-left: 0;
width: 100%;
}
.navbar-wrapper .navbar {
padding-right: 15px;
padding-left: 15px;
width: 100%;
background-color: rgba(0,0,0,0.8);
}
li {
border-left: solid 1px white;
}
li:hover {
background: rgba(0,0,0,0.3);
}
#navbar {
display: table-row;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active">HOME</li>
<li class="dropdown">
ABOUT<span class="caret"></span>
<ul class="dropdown-menu">
<li>LOCATION</li>
<li>PRESS</li>
</ul>
</li>
<li>STRINGS 1</li>
<li>STRINGS 2</li>
<li>HELL RAMEN</li>
<li>JOBS</li>
<li>DARK CHEFS</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
Should I change my ul or li? Please help me out!
Also, it's my first time using Bootstrap so I'm not familiar with it yet. How do I remove the little arrow on the dropdown menu?
Thanks!
Set ul width to 100%
.navbar-nav {
float: left;
margin: 0;
width: 100%;
}
and it's li as 100% divide by number of li it has. You have 7 li, So it will be width: 14%; like this
.navbar-nav>li {
float: left;
text-align: center;
width: 14%; /* 100 divide by 7 li = 14 */
}
For the arrow on dropdown, Just remove <span class="caret"></span> there.
.navbar-wrapper > .container {
padding-right: 0;
padding-left: 0;
width: 100%;
}
.navbar-wrapper .navbar {
padding-right: 15px;
padding-left: 15px;
width: 100%;
background-color: rgba(0,0,0,0.8);
}
.navbar-nav {
float: left;
margin: 0;
width: 100%;
}
.navbar-nav>li {
float: left;
text-align: center;
width: 14%; /* 100 divide by 7 li = 14 */
}
li {
border-left: solid 1px white;
}
li:first-child{
border: 0;
}
li:hover {
background: rgba(0,0,0,0.3);
}
#navbar {
display: table-row;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active">HOME</li>
<li class="dropdown">
ABOUT
<ul class="dropdown-menu">
<li>LOCATION</li>
<li>PRESS</li>
</ul>
</li>
<li>STRINGS 1</li>
<li>STRINGS 2</li>
<li>HELL RAMEN</li>
<li>JOBS</li>
<li>DARK CHEFS</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
You shouldn't need to nest containers and if you change your display properties to a table format you should see the results you're looking for.
.navbar-nav {
display: table;
width: 100%;
}
.navbar-nav > li {
display: table-cell;
float: none;
}
.navbar-nav > li > a {
text-align: center;
}
*Note: I would place these inside a media query so it doesn't disturb your mobile navigation.
See working examples.
Full width of the browser
#media (min-width: 768px) {
.navbar-wrapper .container-fluid {
padding-right: 0;
padding-left: 0;
width: 100%;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav {
display: table;
width: 100%;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li {
display: table-cell;
float: none;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li > a {
text-align: center;
}
}
.navbar-wrapper .navbar {
background-color: rgba(0, 0, 0, 0.8);
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li {
border-left: solid 1px white;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li:hover {
background: rgba(0, 0, 0, 0.3);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="navbar-wrapper">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" 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>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">HOME
</li>
<li class="dropdown">
ABOUT<span class="caret"></span>
<ul class="dropdown-menu">
<li>LOCATION
</li>
<li>PRESS
</li>
</ul>
</li>
<li>STRINGS 1
</li>
<li>STRINGS 2
</li>
<li>HELL RAMEN
</li>
<li>JOBS
</li>
<li>DARK CHEFS
</li>
</ul>
</div>
</div>
</nav>
</div>
Alternative: Full width of a container
#media (min-width: 768px) {
.navbar-wrapper .navbar.navbar-inverse .navbar-nav {
display: table;
width: 100%;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li {
display: table-cell;
float: none;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li > a {
text-align: center;
}
}
.navbar-wrapper .navbar {
background-color: rgba(0, 0, 0, 0.8);
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li {
border-left: solid 1px white;
}
.navbar-wrapper .navbar.navbar-inverse .navbar-nav > li:hover {
background: rgba(0, 0, 0, 0.3);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" 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>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">HOME
</li>
<li class="dropdown">
ABOUT<span class="caret"></span>
<ul class="dropdown-menu">
<li>LOCATION
</li>
<li>PRESS
</li>
</ul>
</li>
<li>STRINGS 1
</li>
<li>STRINGS 2
</li>
<li>HELL RAMEN
</li>
<li>JOBS
</li>
<li>DARK CHEFS
</li>
</ul>
</div>
</nav>
</div>
</div>
Related
How can I make a bootstrap navbar like that: Navbar
The image should be centered on the navbar.
Here is what I have currently:
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.html">
<img style="height:50px;" src="http://kpv.s3.amazonaws.com/static/img/logo.jpg">
</a>
<div class="nav-collapse collapse">
<ul class="nav pull-left">
<li class="active">
Home
</li>
<li>
Pricing
</li>
<li>
FAQ
</li>
</ul>
</div>
This is the CSS that accompanies the above code:
.navbar-inner{
position:relative;
padding-left:70px;
}
.navbar .brand {
margin-left: 0px;
font-size: 20px;
font-weight: 200;
color: #777777;
text-shadow: 0 1px 0 #ffffff;
position: absolute;
width: 50px;
background: #f00;
left: 0px;
top: 0px;
padding: 10px;
}
That's my new code: http://www.bootply.com/gEoN0zJ3e8
How can I make the image centered?
Here's one way you can do this by using position:absolute to place your image. Depending on what you plan on doing for mobile, you'll have to adjust your navbar according (the example assumes the default Bootstrap behavior).
Working Example:
nav.navbar {
margin-top: 50px;
margin-bottom: 65px;
border: 0;
}
nav.navbar .navbar-collapse {
border: 0;
}
nav.navbar .navbar-brand {
position: absolute;
width: 50px;
height: 50px;
left: 50%;
top: -50px;
transform: translateX(-50%);
padding: 0px;
}
nav.navbar .navbar-brand img {
height: 150px;
width: 150px;
margin-left: -50px;
}
#media only screen and (min-width: 768px) {
nav.navbar {
margin-top: 65px;
margin-bottom: 80px;
min-height: 20px;
height: 20px;
}
nav.navbar .navbar-nav > li > a {
font-size: 12px;
padding: 0px 10px;
}
nav.navbar .navbar-brand {
top: -65px;
}
}
#media only screen and (max-width: 767px) {
nav.navbar .navbar-nav {
margin-top: 50px;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img src="http://placehold.it/150x150/b71c1c/fff?text=LOGO">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav">
<li class="active">Home
</li>
<li>Pricing
</li>
<li>FAQ
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="alert alert-info">
Content
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
Here is the code. Adding class to image and adding some css style. You can change position editing .imgc class properties. Enjoy
.menu-container {
background-color:#000000;
height:40px;
}
.navbar-collapse { padding: 1px 30px;}
.navbar-brand {position:absolute;margin-top:-60px;}
.navbar-collapse {
margin-top: 100px;
margin-left: 120px;
color: #fff;
}
.imgc {margin-top:-2px;}
#nav.affix {
position:fixed;
top:0;
width:100%;
z-index:10
}
#sidebar.affix-top {
position:static
}
#sidebar.affix {
position:fixed;
top:80px
}
<div id="nav">
<div class="navbar navbar-default navbar-static">
<div class="menu-container">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<a class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse"><span class="glyphicon glyphicon-bar"></span> <span class="glyphicon glyphicon-bar"></span> <span class="glyphicon glyphicon-bar"></span></a> <a class="navbar-brand" href="#"><img class="imgc" alt="" src="http://placehold.it/150x150&text=Logo"></a>
<div class="navbar-collapse collapse">
<ul>
<li>Home</li>
</ul>
</div>
</div>
</div><!-- /.navbar -->
</div>
<header class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">
<img src="http://qlip.in/images/qlip.png" alt="logo" height="50" width="50">
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-menu" 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>
</div>
<nav id="navbar-menu" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">About <span class="sr-only">(current)</span></li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</nav>
</div>
</header>
if i remove
.navbar-default .container:before, .navbar-default .container:after {
display:none
}
in my css
.navbar-default {
background-color: #722872;
border: none;
border-radius: 0;
height: 80px;
}
.navbar-default .container {
display: flex;
flex-wrap: wrap;
align-items:center;
justify-content:space-between;
}
.navbar-default .container:before, .navbar-default .container:after {
display:none
}
.navbar-brand {
height: 80px;
}
.navbar-brand img {
max-height: 50px;
}
nav .navbar-nav li a {
font-size: 13px;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 2px;
padding-top: 10px;
padding-bottom: 10px;
}
I will get this result
instead of
This Result:
I try figure it out but can't find the answer, thank you.
It's because Bootstrap use the pseudo-elements as a clearfix
.container::before, .container::after {
display: table;
content: " ";
}
Unfortunately, when using flexbox instead of floats (which require clearing) these pseudo-elements become flex-children and so are accounted for when laying out the other children in the flexed parent (the container).
The simplest method of overriding the flexy nature is just to tell them to display:none.
.navbar-default {
background-color: #722872;
border: none;
border-radius: 0;
height: 80px;
}
.navbar-default .container {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
.navbar-default .container:before,
.navbar-default .container:after {
display: none;
}
.navbar-brand {
height: 80px;
}
.navbar-brand img {
max-height: 50px;
}
nav .navbar-nav li a {
font-size: 13px;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 2px;
padding-top: 10px;
padding-bottom: 10px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<header class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">
<img src="http://qlip.in/images/qlip.png" alt="logo" height="50" width="50" />
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-menu" 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>
</div>
<nav id="navbar-menu" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">About <span class="sr-only">(current)</span>
</li>
<li>Portfolio
</li>
<li>Contact
</li>
</ul>
</nav>
</div>
</header>
Is it possible to center the navbar vertically and horizontally?
/**
* Logo.
*/
.button-logo {
font-family: 'Monoton', cursive;
font-weight:normal;
font-size:40px;
font-weight: 300;
line-height: 40px;
letter-spacing: 1px;
}
.button-logo:hover {
text-decoration: none;
}
.button-logo span {
display: block;
clear:both;
color: #000;
}
/**
* Centerise the logo.
*/
.navbar-header {
float: left;
text-align: center;
width: 100%;
}
.navbar-brand {
float:none;
}
/**
* Centerise the navbar.
*/
.navbar .navbar-nav {
display: inline-block;
float: none;
}
.navbar .navbar-collapse {
text-align: center;
}
/**
* Remove default background, radius, etc.
*/
.navbar {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
border: 0;
background: none;
box-shadow: none;
margin-bottom: 0;
}
.navbar-default .navbar-nav > li > a {
font-family: 'Monoton', cursive;
font-size: 25px;
letter-spacing: 2px;
color: #000;
color: rgba(0, 0, 0, 0.5);
padding-bottom: 0 !important;
}
.navbar-default .navbar-nav > li > a:hover {
color: #000;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
background: none;
background: none;
box-shadow: none;
color: #000;
}
<!-- Static navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="offcanvas" data-target=".navmenu" data-canvas="body">
<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 button-logo" href="#">
<span>brand</span>
<span>brand</span>
<span>brand</span>
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<!-- menu-box -->
<div class="menu-box">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</div>
<!-- menu-box -->
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>
But this only centers the navbar horizontally not vertically.
Any ideas?
jsfiddle
to place your navbar in the center of your screen you can simply add
nav {
position: fixed;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
https://jsfiddle.net/anpvtaxu/1/
If Igot your question correctly :
.navbar .navbar-nav {
display: inline-block;
float: none;
}
.navbar .navbar-collapse {
text-align: center;
}
<div class="container">
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li class="dropdown">
Dropdown <b class="caret"></b>
<ul class="dropdown-menu">
<li>Action</li>
<li>Another action</li>
<li>Something else here</li>
<li>Separated link</li>
<li>One more separated link</li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div>
[UPDATE]
Above is for horizontal center;If you want it to be centered vertically use:
top:50%;
in every element you want it be centered vertically.
I'd like to center the brand name inside the navbar between a bunch of links (i.e., 2 links to it's left and 2 to it's right).
The thing is that I want to also make a menu for when the navbar is collapseed and make it like so that the brand WON'T appear in the dropdown list.
https://jsfiddle.net/u471wydy/
UPDATED
Please checkout my solution at CODEPEN
Hope it helps you.
HTML:
<div class="container">
<nav class="navbar navbar-inverse" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<a class="navbar-brand navbar-nav" href="{% url 'chat:index' %}">Chaty</a>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li>Link</li>
<li>Link</li>
</ul>
<ul class="nav navbar-nav">
<li>Link</li>
<li>Link</li>
</ul>
</div>
</nav>
</div>
CSS:
.navbar {
border-radius: 0px;
}
.navbar-brand {
position: absolute;
width: 100%;
left: 0;
top: 0;
text-align: center;
margin: auto;
}
.navbar-toggle {
z-index: 3;
}
ul.nav.navbar-nav {
margin: 0;
}
#media (min-width: 768px) {
.navbar .navbar-nav {
display: inline-block;
float: none;
vertical-align: top;
}
.navbar .navbar-collapse {
text-align: center;
}
ul.nav.navbar-nav {
margin-left: 30px;
margin-right: 30px;
}
}
I have a Bootstrap 3 navbar. When I scale the browser window to a low resolution or access the page with my mobile I have no menu. Usually, with Bootstrap I have a collapsed navigation but it is nowhere to be found.
Here is the HTML:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.php"><img src="images/logo.png"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li>Home</li>
<li class="aktiv" >Advertisers</li>
<li>Publishers</li>
<li>About</li>
<li>Press</li>
</ul>
</div>
</div>
</nav>
CSS:
.navbar {
background-color: #333E48;
border: 0;
display: block!important; /* From Stack Overflow */
}
.navbar-brand > img,
.navbar-brand {
padding:0px;
margin:0;
}
.navbar-brand > img {
padding: 4px;
height: 50px;
margin: auto;
vertical-align: middle;
display: inline-block;
}
.navbar-brand,
.navbar-nav li a {
line-height: 90px;
height: 90px;
padding-top: 0px;
}
.nav-collapse.collapse {
height: auto !important; /* From Stack Overflow */
overflow: visible !important; /* From Stack Overflow */
}
I added display: block!important; to .navbar after reading Nav disappears after resize
I added height: auto !important; overflow: visible !important; to .nav-collapse.collapse after reading Twitter bootstrap responsive navigation disappears after opening and closing
Issue still persists.
It isn't clear in your question but your missing the toggle button to open and close the menu when your viewport is reduced, otherwise the mobile menu will always be open.
nav.navbar-default {
background: #333E48;
border: 0;
}
.navbar-default .navbar-brand > img,
.navbar-default .navbar-brand {
padding: 0px;
margin: 0;
}
.navbar-default .navbar-brand > img {
padding: 4px;
height: 50px;
margin: auto;
vertical-align: middle;
display: inline-block;
}
.navbar-default .navbar-brand,
.navbar-default .navbar-nav li a {
line-height: 90px;
height: 90px;
padding-top: 0px;
}
.navbar-default .nav-collapse.collapse {
height: auto !important;
/* From Stack Overflow */
overflow: visible !important;
/* From Stack Overflow */
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-collapse" 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="index.php">
<img src="http://placehold.it/100x50/fff/fff" />
</a>
</div>
<div class="collapse navbar-collapse" id="bs-collapse">
<ul class="nav navbar-nav navbar-right">
<li>Home
</li>
<li class="aktiv">Advertisers
</li>
<li>Publishers
</li>
<li>About
</li>
<li>Press
</li>
</ul>
</div>
</div>
</nav>
Just have to remove the collapse class on div#navbar
Here is a fiddle
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.php"><img src="images/logo.png"></a>
</div>
<div id="navbar" class="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>Home</li>
<li class="aktiv" >Advertisers</li>
<li>Publishers</li>
<li>About</li>
<li>Press</li>
</ul>
</div>
</div>
</nav>
And rewrite the css for the xs view