Bootsrap 5.3 navbar doesnt stretch to the width of the page - html

I am trying to make the list items in bootstrap navbar stretch all the width of the page in the mobile view but it doesn't work.
I tried some of the tutorials here but none worked. I even tried *{margin:0;padding:0;} in CSS but it doesn't work. I want the navbar list elements width to stretch to the width of the page in mobile view.
This is how it looks in browser:
#header-nav {
background-color: rgb(162, 162, 162);
border-radius: 0;
border-top: 5px solid black;
border-bottom: 5px solid black;
}
.navbar-brand a {
text-decoration: none;
}
.navbar-brand h1 {
font-family: 'Ubuntu', sans-serif;
font-weight: bold;
color: black;
text-shadow: 1px 1px 1px white;
}
.navbar-brand a:hover,
a:focus {
text-decoration: none;
}
.nav-item a {
color: black;
font-family: 'Ubuntu', sans-serif;
font-weight: bold;
text-align: center;
background-color: white;
}
.nav-item a:hover,
a:focus,
a:active {
color: black;
background-color: rgb(188, 188, 188);
}
.navbar-nav {
border-top: 3px solid black;
}
#chickenNav,
#beefNav {
border-bottom: 2px solid black;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<header>
<nav id="header-nav" class="navbar">
<div class="container">
<div class="navbar-header">
<div class="navbar-brand">
<a href="index.html">
<h1>Food, LLC</h1>
</a>
</div>
</div>
<button class="navbar-toggler d-block d-sm-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapse" aria-controls="collapse" aria-expanded="false" aria-label="Toggle navigation">=</button>
<div class="collapse navbar-collapse" id="collapse">
<ul class="navbar-nav">
<li class="nav-item">
<a id="chickenNav" class="nav-link" href="#">Chicken</a>
</li>
<li class="nav-item">
<a id="beefNav" class="nav-link" href="#">Beef</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Sushi</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

You can just use Bootstrap's spacing classes to adjust as needed. I'm removing the horizontal padding from the container with px-0 and adding it back onto the nav header with px-2.
#header-nav {
background-color: rgb(162, 162, 162);
border-radius: 0;
border-top: 5px solid black;
border-bottom: 5px solid black;
}
.navbar-brand a {
text-decoration: none;
}
.navbar-brand h1 {
font-family: 'Ubuntu', sans-serif;
font-weight: bold;
color: black;
text-shadow: 1px 1px 1px white;
}
.navbar-brand a:hover,
a:focus {
text-decoration: none;
}
.nav-item a {
color: black;
font-family: 'Ubuntu', sans-serif;
font-weight: bold;
text-align: center;
background-color: white;
}
.nav-item a:hover,
a:focus,
a:active {
color: black;
background-color: rgb(188, 188, 188);
}
.navbar-nav {
border-top: 3px solid black;
}
#chickenNav,
#beefNav {
border-bottom: 2px solid black;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<header>
<nav id="header-nav" class="navbar">
<div class="container px-0">
<div class="navbar-header px-2">
<div class="navbar-brand">
<a href="index.html">
<h1>Food, LLC</h1>
</a>
</div>
</div>
<button class="navbar-toggler d-block d-sm-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapse" aria-controls="collapse" aria-expanded="false" aria-label="Toggle navigation">=</button>
<div class="collapse navbar-collapse" id="collapse">
<ul class="navbar-nav">
<li class="nav-item">
<a id="chickenNav" class="nav-link" href="#">Chicken</a>
</li>
<li class="nav-item">
<a id="beefNav" class="nav-link" href="#">Beef</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Sushi</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

Related

Bootstrap 3 Upgrade to Bootstrap 5 NavBar Issue

I am responsible for upgrading Bootstrap from 3 to 5, and allow some minor UI changes, like px-wise changes. However I am suffering from navbar transition like the below discussed.
Here is the simplified version of my navbar using Bootstrap 3.
.image-header-logo {
margin: -5px;
height: 34px;
}
.custom-navbar {
box-shadow: 0px 0px 6px rgb(255 100 0);
}
.navbar {
border: 0px;
}
.navbar-nav > li.active {
box-shadow: inset 0px -5px 0px 0px rgba(255, 119, 0, 0.68);
}
.navbar-nav > li > a {
color: #ff6633;
}
.navbar-nav > li > a:hover {
background: rgb(255, 119, 0);
color: #ffffff;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<nav class="navbar custom-navbar">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" 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="#">
<img class="image-header-logo" src="https://www.gravatar.com/avatar/e8bf61002bf07be4ca6085c301f990c0?s=64" />
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right" >
<li><a class="nav-menu-item">Welcome</a></li>
<li class="active">
<a class="nav-selected-menu-item nav-text-color" href="#">Java</a>
</li>
<li>
<a class="nav-selected-menu-item nav-text-color" href="#">PHP</a>
</li>
</ul>
</div>
</div>
</nav>
And here is the new code using Bootstrap 5.
body {
font-size: 14px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}
.image-header-logo {
height: 2.5rem;
}
.navbar {
padding: 0 1rem;
margin-bottom: 6px;
}
.custom-navbar {
box-shadow: 0px 0px 6px rgb(255 100 0);
}
.nav-item {
cursor: pointer;
padding: 0.5rem 0;
}
.navbar .navbar-collapse .navbar-nav .nav-item.active {
box-shadow: inset 0px -5px 0px 0px rgba(255, 119, 0, 0.68);
cursor: pointer;
}
.navbar .navbar-collapse > .navbar-text,
.navbar .navbar-collapse .navbar-nav .nav-item > .nav-link {
color: #ff6633;
}
.navbar .navbar-collapse .navbar-nav .nav-item:hover {
background: rgb(255, 119, 0);
color: #ffffff; /* FIXME: not work == */
}
/* FIXME: need to add this, but in the outskirt it does not work */
.navbar .navbar-collapse .navbar-nav .nav-item > .nav-link:hover {
color: #ffffff;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.min.js"></script>
<nav class="navbar navbar-expand-md navbar-light custom-navbar">
<a class="navbar-brand" href="/i/trade">
<img class="image-header-logo" src="https://www.gravatar.com/avatar/e8bf61002bf07be4ca6085c301f990c0?s=64" />
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#myNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="myNavbar">
<span class="navbar-text ms-auto">Welcome</span>
<ul class="navbar-nav">
<li class="nav-item active px-1">
<a class="nav-link">Java</a>
</li>
<li class="nav-item px-1">
<a class="nav-link">PHP</a>
</li>
</ul>
</div>
</nav>
As it seems there is a rendering issue in stackoverflow, I have also place the code in jsfiddle.
The same codebase can also be found in jsfiddle.
Bootstrap 3: https://jsfiddle.net/hphchan/hfo9njc3/66/
Bootstrap 5: https://jsfiddle.net/hphchan/4yrxu8dk/60/
Most of the UI generated from the 2 version looks similar, but with the below issue.
When hover on nav-item but not nav-link in Bootstrap 5, as there is a padding in nav-item, making the hover color changes not work.
which can be seen in the picture below.
And here is the Bootstrap 3 version, which works in the edge.
I understand why it does not work due to the class structure change. However what I do not know is how to make the hover behavior the same.
You can emulate the behavior using the hover selector only for the nav-link class and forgetting the nav-item to simplify what style applies when hovered.
This way nav-link should have color: #ff6633 when not hovered and color: #ffffff when hovered:
.navbar .navbar-collapse>.navbar-text,
.navbar .navbar-collapse .navbar-nav .nav-item>.nav-link {
color: #ff6633;
}
.navbar .navbar-collapse .navbar-nav .nav-item>.nav-link:hover {
color: #ffffff;
background: rgb(255, 119, 0);
}
Also, remove the ** margin-bottom ** property for the .navbar.
The markup for the ul would be:
<ul class="navbar-nav">
<li class="nav-item active mx-2">
<a class="nav-link py-3 px-3">Java</a>
</li>
<li class="nav-item ms-2">
<a class="nav-link py-3 px-3">PHP</a>
</li>
</ul>
Working example:
body {
font-size: 14px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.image-header-logo {
height: 2.5rem;
}
.navbar {
padding: 0 1rem;
/* override default 0.5rem 1rem */
/* box-shadow: 0px 0px 6px rgb(255, 100, 0); */
/* TODO: placed in #header instead */
margin-bottom: 6px;
/* reserve space for the box-shadow */
}
.custom-navbar {
box-shadow: 0px 0px 6px rgb(255 100 0);
}
/* to create sadow on the bottom */
.nav-item {
cursor: pointer;
}
.navbar .navbar-collapse .navbar-nav .nav-item.active>.nav-link {
box-shadow: inset 0px -5px 0px 0px rgba(255, 119, 0, 0.68);
cursor: pointer;
}
/* to show orange in color on the line */
/* need to specify for so long, so that it can win without use of !important... == */
.navbar .navbar-collapse>.navbar-text,
.navbar .navbar-collapse .navbar-nav .nav-item>.nav-link {
color: #ff6633;
}
/* FIXME: need to add this, but in the outskirt it does not work */
.navbar .navbar-collapse .navbar-nav .nav-item>.nav-link:hover {
color: #ffffff;
background: rgb(255, 119, 0);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css">
<nav class="navbar navbar-expand navbar-light custom-navbar py-0">
<a class="navbar-brand" href="/i/trade">
<img class="image-header-logo" src="https://www.gravatar.com/avatar/e8bf61002bf07be4ca6085c301f990c0?s=64" />
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#myNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="myNavbar">
<span class="navbar-text ms-auto">Welcome</span>
<ul class="navbar-nav">
<li class="nav-item active mx-2">
<a class="nav-link py-3 px-3">Java</a>
</li>
<li class="nav-item ms-2">
<a class="nav-link py-3 px-3">PHP</a>
</li>
</ul>
</div>
</nav>

Changing the Border Color of an Active Anchor Link on a Bootstrap Navbar

I'm coding a navbar in Bootstrap. When an anchor link is active or selected, there is a border around it that is black and the resulting text is white. The goal is to make it so that there is no border/background color and the text is orange when it is selected instead of white. If you could provide some recommendations for how the code needs to be changed, that is greatly appreciated.
The image below illustrates what it looks like.
nav {
font-family: 'Poppins', sans-serif;
position: sticky;
border: 0;
}
.nav-link {
margin-top: 0em;
margin-left: 1.5em;
font-size: 1.2em;
}
#media screen and (min-width: 768px) {
.nav-link {
margin-top: 1.0em;
margin-left: 1.5em;
font-size: 1.2em;
}
}
.navbar-light .nav-item.active .nav-link,
.navbar-light .nav-item .nav-link:active,
.navbar-light .nav-item .nav-link:focus,
.navbar-light .nav-item:hover .nav-link {
color: #FC9639;
}
.navbar-light .nav-item .nav-link:focus {
background-color: white;
}
.icon-bar {
background-color: #000000 !important;
border: 0;
}
.navbar-light {
background-color: white !important;
border: none !important;
border-width: 0!important;
}
.logo {
margin-left: 25px;
width: 80px;
height: 80px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#3.4.1/dist/js/bootstrap.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#3.4.1/dist/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-light bg-white 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> -->
<img src="fusebloomLogo.png" alt="FuseBloom logo" class="logo" />
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active nav-item">
<a class="nav-link" href="#home">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#mission">Mission</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#reviews">Reviews</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#process">Process</a>
</li>
</ul>
</div>
</div>
</nav>

Button on click changing colors

Here is my code, I want the dropdown not to shade gray how it is, but rather highlight similar to the other links on the navbar.
li {
text-align: center;
}
.dropdown-toggle {
background-color: white;
color: #0066ff;
border-color: white;
}
.dropdown-toggle:hover {
background-color: white;
border-color: white;
color: #0033cc;
}
.dropdown-toggle:active {
background-color: white;
border-color: white;
color: #0033cc;
box-shadow: none;
}
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link active" href="index.html">Home</a>
</li>
<li class="nav-item">
<div class="btn-group dropright">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Desktops
</button>
<div class="dropdown-menu">
</div>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
</ul>
</body>
</html>
I tweaked the bootstrap styling at the top, and also have my failed attempt with the .dropdown-toggle:active
I came up with this... not sure if that's what you asked for though.
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<style>
li {
text-align: center;
}
.dropdown-toggle {
background-color: white;
color: #0066ff;
border-color: white;
}
.dropdown-toggle:hover {
background-color: white;
border-color: white;
color: #0033cc;
}
.dropdown-toggle:active {
background-color: white;
border-color: white;
color: #0033cc;
box-shadow: none;
}
#button_desktop:focus {
background-color: white;
color: #0033cc;
outline: none;
border: none;
box-shadow: none;
}
</style>
<body>
<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link active" href="index.html">Home</a>
</li>
<li class="nav-item">
<div class="btn-group dropright">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="button_desktop">
Desktops
</button>
<div class="dropdown-menu">
</div>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
</ul>
</body>
</html>
Have a great day!
This worked for me.try it
.dropdown-toggle:active, .open .dropdown-toggle, dropdown-toggle:hover{ background:white !important; color:#000 !important; box-shadow:#000 important!;}
.dropdown-toggle[aria-expanded="true"] { background:#FFF !important; color:#000 !important; border-color:#fff important!; box-shadow:#fff important!;}

Bootstrap hamburger no longer appears after modifying colors

I am fairly new to html, css, js and bootstrap 4. I am trying to build a website just to practice my skills. I finally managed to change the colors, text, font-size etc of my bootstrap 4 navbar, however not when I scale down, the hamburger symbol disappears and I lose my options.
The only bit of code I removed was the bg-light to change the color, as well as create a custom class on my to change text color
a link to my code: https://codepen.io/jehc10/pen/LKqRRQ
.navbar-nav {
background:#4287f5;
}
.navbar-brand {
background:#4287f5;
}
.navbar-brand.custom{
color:#FFFFFF;
font-size:25px
/* border-right:2px solid black; */
}
.navbar {
background:#4287f5;
}
body {
font-family: 'Poppins', sans-serif;
/* font-weight:700; */
}
.navbar-nav li a {
color: #FFFFFF;
font-size:20px;
}
Instead of using an image hamburger, create hamburger using HTML and CSS.
.navbar, .navbar-nav {
background: #4287f5;
}
.navbar-brand.custom {
color: #FFFFFF;
font-size: 25px
}
.navbar-toggler {
padding: .25rem .5rem;
font-size: 1.25rem;
line-height: 1;
background-color: transparent;
border: 1px solid transparent;
border-radius: .25rem;
}
.navbar-togglebar {
background: #FFFFFF;
display: block;
width: 25px;
height: 2px;
vertical-align: middle;
margin: 5px;
}
.navbar-nav li a {
color: #FFFFFF;
font-size: 20px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand custom" href="#">Jesse</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-togglebar"></span>
<span class="navbar-togglebar"></span>
<span class="navbar-togglebar"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">About me <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact me</a>
</li>
</ul>
</div>
</nav>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
You can add the following styling to the navigation burger icon:
/*Initial burger state*/
button.navbar-toggler.navbar-dark.collapsed {
background: #000;
}
/*When toggled*/
.navbar-toggler:not(:disabled):not(.disabled) {
cursor: pointer;
background: #000;
}

In navbar glyphicon is not showing properly(Bootstrap)

I am trying to create a navbar using bootstrap.But the home icon in navbar is not showing properly.It is not in middle and not in parallel with other list.Please help me to solve this.
Problem:
HTML:
<nav class="navbar navbar-inverse">
<div class="container">
<div class="row">
<nav class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a href="#" class="navbar-brand text-center">
<span class="glyphicon glyphicon-home"></span>
</a>
</li>
<li class="active">
<a href="#">Avro keyboard<br/>
<small>For windows</small>
</a>
</li>
<li>
<a href="#">iAvro<br/>
<small>For Mac OS X</small>
</a>
</li>
<li>
<a href="#">ibus-avro<br/>
<small>for linux</small>
</a>
</li>
<li>
<a href="#">Bangla Fonts<br/>
<small>Unicode/ANSI fonts</small>
</a>
</li>
<li>
<a href="#">Others<br/>
<small>Misc goodies</small>
</a>
</li>
<li>
<a href="#">Blog<br/>
<small>Stay updated!</small>
</a>
</li>
<li>
<a href="#">Help and support<br/>
<small>Forum & Help files</small>
</a>
</li>
<li>
<a href="#">Developers<br/>
<small>repositories and resources</small>
</a>
</li>
</ul>
</nav>
</div>
</div>
</nav>
CSS:
li {
border-left: 1px solid;
border-top: 0px;
border-right: 1px solid;
border-bottom: 0px;
border-style: solid;
border-color: #545454;
}
a {
color: #FFFFFF !important;
}
small {
color: #C5C6C1;
font-style: italic;
}
You can apply any changes to the CSS rule below:
.navbar-inverse .navbar-brand .glyphicon{
padding: 5px 0 0 15px;
}
.navbar {
border-radius: 0;
}
.navbar-inverse .navbar-header .navbar-brand {
color: #FFFFFF;
}
.navbar-inverse .navbar-nav > li:first-child {
border: none;
padding-top: 10px;
}
.navbar-inverse .navbar-nav {
border-left: 1px solid #545454;
}
.navbar-inverse .navbar-nav > li {
border: none;
border-left: 1px solid #545454;
border-right: 1px solid #545454;
}
.navbar-inverse ul.navbar-nav > li > a {
color: #FFFFFF;
}
small {
color: #C5C6C1;
font-style: italic;
}
#media (min-width: 1200px) {
.navbar .navbar-nav {
display: inline-block;
float: none;
vertical-align: top;
}
.navbar .navbar-collapse {
text-align: center;
}
.navbar-inverse .navbar-header a {
display: none;
}
}
#media (max-width: 1200px) {
.navbar-inverse .navbar-nav > li:first-child {
display: none;
}
.navbar-inverse .navbar-nav {
border: none;
}
.navbar-inverse .navbar-brand {
line-height: 0;
}
.navbar-inverse .navbar-nav > li {
border: none;
}
.navbar-inverse .navbar-header {
float: none;
}
.navbar-inverse .navbar-left,
.navbar-right {
float: none !important;
}
.navbar-inverse .navbar-toggle {
display: block;
}
.navbar-inverse .navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-inverse .navbar-collapse.collapse {
display: none !important;
}
.navbar-inverse .navbar-nav {
float: none !important;
margin-top: 7.5px;
}
.navbar-inverse .navbar-nav > li {
float: none;
}
.navbar-inverse .navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar-inverse .collapse.in {
display: block !important;
}
}
<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.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" 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="#"> <span class="glyphicon glyphicon-home"></span>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li> <a href="#"><span class="glyphicon glyphicon-home"></span>
</a>
</li>
<li class="active"> <a href="#">Avro keyboard<br/>
<small>For windows</small>
</a>
</li>
<li> <a href="#">iAvro<br/>
<small>For Mac OS X</small>
</a>
</li>
<li> <a href="#">ibus-avro<br/>
<small>for linux</small>
</a>
</li>
<li> <a href="#">Bangla Fonts<br/>
<small>Unicode/ANSI fonts</small>
</a>
</li>
<li> <a href="#">Others<br/>
<small>Misc goodies</small>
</a>
</li>
<li> <a href="#">Blog<br/>
<small>Stay updated!</small>
</a>
</li>
<li> <a href="#">Help and support<br/>
<small>Forum & Help files</small>
</a>
</li>
<li> <a href="#">Developers<br/>
<small>repositories and resources</small>
</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>