Collapsed menu in Navbar: removing transparent margin from list elements? - html

I've been searching for a few hours on this and poured over the bootstrap code to no avail so here I am! I set my navbar to collapse at 991px and, once viewed, the list elements have the background color I wanted, but when you hover over them there's apparently a transparent margin for each list element. How would I get rid of this margin, i've been messing with navbar-nav li a and my links in the navbar are H5s so also navbar-nav li a H5. The last list element is a dropdown link and in the media query when clicked it remains as if hovered over so I'm assuming there's a focus tag with it I just can't think exactly how to fix these two things (still very new to CSS/Bootstrap if you didn't know). Here is the HTML below and any help is very much appreciated!
<nav class="navbar navbar-default navbar-fixed-top">
<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="#topFixedNavbar1" 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="#">Logo</a></div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="topFixedNavbar1">
<ul class="nav navbar-nav navbar-right links">
<li><h5>How We Work</h5></li>
<li><h5>Abous Us</h5></li>
<li class="dropdown"><h5>Course Subjects</h5><span class="caret"></span>
<ul class="dropdown-menu dropdown-menu-right">
<li>Action</li>
<li>Another action</li>
<li>Something else here</li>
<li role="separator" class="divider"></li>
<li>Separated link</li>
</ul>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
And here is the CSS (I included the whole file, but I'm pretty sure the problem will have to do with the media query):
body{
padding-top: 120px;
background-color:#34A0CD;
}
.navbar-default{
height:120px;
}
.navbar-header, .navbar-brand{
height:120px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
#topFixedNavbar1{
height:120px;
}
.links{
height:120px;
}
.navbar-nav li a h5{
line-height:80px;
}
.dropdown li a {
line-height:30px;
}
#media (max-width: 991px) {
.dropdown li a{
line-height:30px;
}
.collapse.navbar-collapse{
width:100%;
}
.links li a{
width:100%;
}
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-collapse.in {
overflow-y: visible;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
}
.navbar-nav>li {
float: none;
}
.navbar-nav li a h5{
line-height: 30px;
background-color: gray;
color: #F1E9E9;
}
.navbar-nav li a{
background-color:gray;
width:100%;
}
.navbar-text {
float: none;
margin: 15px 0;
}
/* since 3.1.0 */
.navbar-collapse.collapse.in {
display: block!important;
}
.collapsing {
overflow: hidden!important;
}
}

I forked into a Fiddle that was created with Bootstrap in mind and threw in your code so I think I might have reproduced the issue. The problem didn't seem to be margins at all but background color that is set to transparent on hover/focus by default in Bootstrap.
.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: rgb(51, 51, 51);
background-color: transparent;
}
I tested out just a simple modification to this with to override the default styles and it seemed to work.
.navbar-collapse .navbar-nav>li>a:hover,
.navbar-collapse .navbar-nav>li>a:focus{
background-color: gray;
}
Here's a demo
Obviously you can modify that however, but that should put you on the right track.

Related

How to keep navigation bar collapsed on all screen sizes?

I tried these two different solutions suggested here on SO :
How to keep Bootstrap 3 navbar as collapsed for all screen sizes
Change bootstrap navbar collapse breakpoint without using LESS
I've also tried many other different solutions suggesting more or less the same. None worked for me.
How can I keep Bootstrap 3 navigation bar collapsed on all screen sizes, both big and small?
This is the HTML :
<nav class="navbar navbar-default navbar-custom">
<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="index.html">
<img class="img-responsive imglogoheader" src="images/logo1.png">
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="">Home</li>
<li>Profile</li>
<li>Settings</li>
<ul style="display:none !important;" class="nav navbar-nav navbar-right"></ul>
</div>
</div>
</nav>
To make the navbar menu toggle-able on all responsive intervals in Bootstrap 3, you need this snippet:
#media (min-width: 768px) {
.navbar {
.navbar-header,
.navbar-nav>li {
float: none;
}
.navbar-nav {
float: none;
margin: 7.5px -15px;
}
.navbar-toggle {
display: block;
margin-right: 0;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar-collapse.collapse {
display: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar-text {
float: none;
margin: 15px 0;
}
.navbar-collapse.collapse.in {
display: block;
}
.collapsing {
overflow: hidden;
}
}
}
Please note it's SCSS. If you want it as CSS, you could copy/paste it from the demo at the end of the answer.
The solution is largely adapted from this answer but I thought it's worth posting it as a clean one rather then telling you to play with breakpoints and clean it up.
Most importantly, it doesn't use !important.
Feel free to upvote the original answer. It is an exceptional solution to a difficult problem, especially considering the complexity of Bootstrap 3's navbar collapse logic mechanics (it's done by the collapse plugin, in JavaScript - which makes it difficult to debug and/or reverse engineer).
See it working:
#media (min-width: 768px) {
.navbar .navbar-header,
.navbar .navbar-nav>li {
float: none;
}
.navbar .navbar-nav {
float: none;
margin: 7.5px -15px;
}
.navbar .navbar-toggle {
display: block;
margin-right: 0;
}
.navbar .navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar .navbar-collapse.collapse {
display: none;
}
.navbar .navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar .navbar-text {
float: none;
margin: 15px 0;
}
.navbar .navbar-collapse.collapse.in {
display: block;
}
.navbar .collapsing {
overflow: hidden;
}
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<nav class="navbar navbar-default navbar-custom">
<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="index.html">
Logo
</a>
</div>
<div class="collapse .navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="">Home</li>
<li>Profile</li>
<li>Settings</li>
</ul>
</div>
</div>
</nav>
The answer suggested by tao worked at 60% but not all the way for me. Here I share what finally did it for me. In my custom.css I override bootstrap with custom rules
custom.css
#media (min-width: 768px) {
.navbar .navbar-header,
.navbar .navbar-nav>li {
float: none;
}
.navbar .navbar-nav {
float: none;
margin: 7.5px -15px;
}
.navbar .navbar-toggle {
display: block;
margin-right: 0;
}
.navbar .navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar .navbar-collapse.collapse {
display: none;
}
.navbar .navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar .navbar-text {
float: none;
margin: 15px 0;
}
.navbar .navbar-collapse.collapse.in {
display: block;
}
.navbar .collapsing {
overflow: hidden;
}
}
I had to comment out this line in bootstrap.min.cs to make it all work :
.navbar-collapse.collapse {
/* display:block!important;*/
height:auto!important;
padding-bottom:0;
overflow:visible!important
}

Changing width of Fixed navbar and keeping Collapse element and adding logo/image

i'm trying to change the width of my navbar which is fixed and also has a navbar-collapse property that i want to keep when screen size changes.
I also added in the Bootstrap i am using for this page, so at the moment with the code below, the navbar is fixed but is full width, it collapses when you change to mobile site, so the only thing i want is to change the width from full width so that there is atleast 30% open space on either side of the navbar so it will be centred to the page.
and also adding a logo/image to the navbar only when its collapsed
Hope you can help me!
<html>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style>
.navbar-nav.nav-justified > li{float:none; }
.navbar{
background-color:white;
font-family: Amatic SC;
border:none;
font-size: 25px;
letter-spacing: 1px;
text-align:center;
}
.navbar:hover,
.navbar:active {
color: black;
transition: background-color 0.3s ease-oin,
color 0.3s ease-out;
}
.navbar-inverse .navbar-nav>li>a:hover {
color: black;
}
#media (max-width: 981px) {
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-fixed-top {
top: 0%;
border-width: 0 0 1px;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin-top: 7.5px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.collapse.in{
display:block !important;
}
}
</style>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" "col-xs- col-xs-offset-0 col-md-6 col-md-offset-3" >
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-collapse collapse" style="text-align:center" >
<ul class="nav navbar-nav nav-justified">
<li id="scrollDetails">Details</li>
<li id="scrollDirections">Directions</li>
<li id="navRsvp">RSVP</li>
<li id="scrollBucket">Bucket List</li>
<li id="scrollAccommodation">Accommodation</li>
</ul>
</div>
</nav>
</body>
</html>
You have to modify the width and centrally align your code in the media queries for the expected behaviour in mobile view.
You have to add the following css:
#media (max-width: 981px) {
.navbar {
width: 30%;
margin: auto;
}
}
Refer code:
.navbar-nav.nav-justified > li {
float: none;
}
.navbar {
background-color: white;
font-family: Amatic SC;
border: none;
font-size: 25px;
letter-spacing: 1px;
text-align: center;
}
.navbar:hover,
.navbar:active {
color: black;
transition: background-color 0.3s ease-oin, color 0.3s ease-out;
}
.navbar-inverse .navbar-nav>li>a:hover {
color: black;
}
#media (max-width: 981px) {
.navbar {
width: 30%;
margin: auto;
}
.navbar-left,
.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar-fixed-top {
top: 0%;
border-width: 0 0 1px;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin-top: 7.5px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.collapse.in {
display: block !important;
}
}
<nav class="navbar navbar-inverse navbar-fixed-top col-xs-offset-0 col-md-6 col-md-offset-3">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-collapse collapse" style="text-align:center">
<ul class="nav navbar-nav nav-justified">
<li id="scrollDetails">Details
</li>
<li id="scrollDirections">Directions
</li>
<li id="navRsvp">RSVP
</li>
<li id="scrollBucket">Bucket List
</li>
<li id="scrollAccommodation">Accommodation
</li>
</ul>
</div>
</nav>

Customize Navbar Collapse button

How can i change the color of the collapse button there? and the white lines like the divider. here is the picture. Can someone help me? im new to css,bootstrap and html so please help me. or give me some ideas.
Here is my code.
<nav class ="navbar navbar-default" role= "navigation">
<div class = "container">
<div class ="navbar-header">
<button type ="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav-collapse">
<span class="icon-bar" ></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="nav-collapse">
<ul class="nav navbar-nav">
<li class="active">Students</li>
<li class="nav-divider"></li>
<li>Faculty</li>
<li class="nav-divider"></li>
<li>About us</li>
<li class="nav-divider"></li>
<li>Contact us</li>
<li class="nav-divider"></li>
</ul>
</div>
</div>
</nav>
Here is my css.
#fot{ position:fixed;
bottom:0;
}
.navbar-default{
background-color:rgb(193,57,45);
}
.navbar .nav > li > a{
color:#ffe6e6;
}
.navbar .nav > li > a:hover{
color:#000000;
}
.navbar .nav .active > a{
background-color:rgb(193,57,45);
color:#000000;
}
.navbar .nav .active > a:hover{
background:none;
color:#fff;
}
.nav .nav-divider{
height: 50px;
margin: 0 10px;
border-right: 1px solid #a92419;
border-left: 1px solid #c1392d;
}
#media(max-width: 768px)
{.nav .nav-divider{
height: 1px;
margin: 0 10px;
background-color:#a92419;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
margin:0 0 4px;
width: 25px;
height: 5px;
}
I guess this is what you are looking for:
.icon-bar
{
background:green !important; /*Whatever colour you want for icon lines*/
}
.navbar-toggle
{
background:yellow !important; /*Whatever colour you want for background */
}
In the CSS !important forces to apply property aside it over actual properties of Bootstrap CSS.
Update: In your CSS ADD Following code:
.navbar-default .navbar-collapse, .navbar-default .navbar-form {
border-color: darkblue; /* Whatever Colour you want */
}
Yes ofcourse...just define some css on button class like this
CSS
button.navbar-toggle{
background:none;
border:none;
color:#000;
// and so on according to what style u want...
}
button.navbar-toggle span{
background:#000;/*change accordingly*/
// these span are for white line you can edit the lines in this css
}

Customizing Navbar collapse button when hover

How to remove the background of the collapse button when the mouse hover to the button. here is the picture. I really want to remove that white background when mouse hover to that button please help me. Im new to html and css and also to bootstrap.
Here is my html code
<nav class ="navbar navbar-default" role= "navigation">
<div class = "container">
<div class ="navbar-header">
<button type ="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav-collapse">
<span class="icon-bar" ></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="nav-collapse">
<ul class="nav navbar-nav">
<li class="active">Students</li>
<li class="nav-divider"></li>
<li>Faculty</li>
<li class="nav-divider"></li>
<li>About us</li>
<li class="nav-divider"></li>
<li>Contact us</li>
<li class="nav-divider"></li>
</ul>
</div>
</div>
</nav>
Here is my css code.
#fot{ position:fixed;
bottom:0;
}
.navbar-default{
background-color:rgb(193,57,45);
}
.navbar .nav > li > a{
color:#ffe6e6;
}
.navbar .nav > li > a:hover{
color:#000000;
}
.navbar .nav .active > a{
background-color:rgb(193,57,45);
color:#000000;
}
.navbar .nav .active > a:hover{
background:none;
color:#fff;
}
.nav .nav-divider{
height: 50px;
margin: 0 10px;
border-right: 1px solid #a92419;
border-left: 1px solid #c1392d;
}
#media(max-width: 768px)
{
.nav .nav-divider{
height: 1px;
margin: 0 10px;
background-color:#a92419;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
margin:0 0 4px;
width: 25px;
height: 5px;
}
button.navbar-toggle{
background:none;
border:none;
color:#000;
}
.navbar-default .navbar-collapse, .navbar-default .navbar-form {
border-color: #a92419;
}
}
You need to specify the background-color for both hover as well as focus.
You can do that by adding this to your CSS:
.navbar-default .navbar-toggle:focus, .navbar-default .navbar-toggle:hover {
background: none;
}
Here's a jsFiddle with the above code: https://jsfiddle.net/AndrewL32/mowb6gcb/
use this css which works on hover
button.navbar-toggle:hover{
background:none;
/* other css as you requirment*/
}
This is the normal, straight forward way, using the psuedo class :hover to add a css style to items upon hovering the mouse over them
button.navbar-toggle {
background: #ccc; //a gray background as default
}
button.navbar-toggle:hover {
background: none; //no background when you hover over the button
}

bootstrap collapse menu has 2 rows

I am building this website
torgoborudovanie.com
I have a collapsing navbar build with bootstrap.But when I try to resize the window I get something like this :
As you can see (and you can actually try it ) nav bar now has 2 lines and it looks wired (the actual problem is that it looks like this on Iphone and Ipad) Then you can resize it a little bit more and it gets collapsed as I want.
You can see the code by simply viewing html code in developer tools.
So I will not post it here to make qustion clean and small.But if you want I can post the code here too=)
I ended up with this (quite shitty to be fair workaround)
On page load if I have window.width less than 1200px I just hide long text.
function hideSlogan() {
if($(window).width() <1200) {$('.slogan').hide()}
};
hideSlogan();
Go to the CSS rules starting at the MOBILE NAV comment; these are the rules you can adjust to make the navbar collapse at different breakpoints.
On a sidenote, there is one extra, broken list tag in the nav and with the positioning of Надежный партнер - качественные решения! inside your navbar-collapse div you'll the following behavior:
If you expand the menu when it's in the mobile and then expand the viewport your navbar will revert to the line-height: 60px unless the browser is refreshed. Might not matter but since you're trying to change the collapse breakpoint it's worth mentioning.
**I also moved the inline styles with the rest of the CSS Rules.
#import url(http://fonts.googleapis.com/css?family=Open+Sans:400, 700, 800);
#import url(http://fonts.googleapis.com/css?family=Libre+Baskerville:400italic);
* {
margin: 0;
padding: 0px;
font-family: 'Open Sans', sans-serif;
}
body {
background: #fff;
margin: 0;
color: #42413e;
padding-top: 50px;
}
/* BOOTSTRAP MODIFICATION */
.navbar-right a .btn-orange {
margin-top: -5px;
}
.btn-orange {
background: #f27242;
border-radius: 2px;
color: white;
font-size: 12px;
font-weight: 700;
}
.btn-orange:hover {
background: #e16a3e;
color: white;
}
.navbar-default .navbar-brand {
height: 50px;
padding: 10px 15px;
font-size: 20px;
line-height: 22px;
font-weight: 700;
}
.navbar.navbar-default {
background-color: #ffffff;
border-color: #e7e7e7;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #f27242;
background-color: transparent;
}
.navbar-default .navbar-nav > li > a {
color: #ccc;
}
.navbar-default .navbar-right {
padding-top: 5px
}
.navbar-default li.dropdown a {
color: black;
}
.navbar-default span.head-title {
line-height: 60px;
}
.navbar-default .navbar-right .dropdown-menu {
right: auto;
left: 0;
}
.navbar-right li.contact-info a {
color: #42413e;
}
/****MOBILE NAVBAR******/
#media (max-width: 1200px) {
.custom-navbar .navbar-header {
float: none;
}
.custom-navbar .navbar-left,
.custom-navbar .navbar-right {
float: none !important;
}
.custom-navbar .navbar-toggle {
display: block;
}
.custom-navbar .navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
overflow-x: hidden;
}
.custom-navbar.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.custom-navbar .navbar-collapse.collapse {
display: none!important;
}
.custom-navbar .navbar-nav {
float: none!important;
margin-top: 7.5px;
}
.custom-navbar .navbar-nav > li {
float: none;
}
.custom-navbar .navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
}
.custom-navbar .collapse.in {
display: block !important;
}
.custom-navbar .navbar-nav .open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.custom-navbar .navbar-brand {
height: 55px;
padding: 10px 15px;
font-size: 20px;
line-height: 22px;
font-weight: 700;
}
}
<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.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" />
<nav class="navbar navbar-default custom-navbar navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Переключить навигацию</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img src="http://www.torgoborudovanie.com/assets/img/logo1.png" width="140">
</a>
</div>
<div class="collapse navbar-collapse"><span class="head-title">Надежный партнер - качественные решения!</span>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown"> Каталог <span class="caret"></span>
<ul class="dropdown-menu">
<li>Стеллажи
</li>
<li>Торговая мебель
</li>
<li>Тележки и корзины
</li>
<li> Кассовые боксы
</li>
<li>Холодильное оборудование
</li>
<li role="separator" class="divider"></li>
<li>Условия доставки
</li>
</ul>
</li>
<li class="contact-info">
<i class="fa fa-phone "></i> 8 (343) 3448090
</li>
<li class="contact-info">
<i class="fa fa-envelope"></i> info#optimagp.ru
</li>
<li>
<a href="#f">
<button class="btn btn-sm btn-orange" type="button">Заказать звонок</button>
</a>
</li>
</ul>
</div>
</div>
</nav>
you need to change your breakpoint, when the navbar gets collapsed...
so for example, this should work:
#media only screen and (min-width: 1200px) {
.collapse {
display: block;
}
.navbar-toggle {
display: none;
}
}
#media only screen and (max-width: 1200px) {
.collapse {
display: none;
}
.navbar-toggle {
display: block;
}
}
because it floats (because its so long) after 1200px width...
** sorry, i made a mistake... try it now :) **