navbar container to mobile collapse full width(container-fluid) - html

i have a container div where i have my logo, and at the right i have my menu, what i want to do is, when the navbar gets at screen size mobile i want each to be on a row and each row is the size of a container-fluid, at the moment the issue is that each li size is the same of my container, how i can change this?
this is my code:
<div id="navigation_bar">
<div class="content">
<div id="logo">
<a href="index.html">
<img class="logo_dark" src="images/virtuai/logo-dark.png" alt="Enar Logo">
<img class="logo_light" src="images/logo-light.png" alt="Enar Logo">
</a>
</div>
<nav id="main_nav navbar-right">
<div id="nav_menu">
<span class="mobile_menu_trigger">
<span></span>
</span>
<ul id="navy" class="clearfix" style="float:right">
<li class="normal_menu mobile_menu_toggle current_page_item">
<span>HOME</span>
</li>
<li class="normal_menu mobile_menu_toggle current_page_item">
<span>ABOUT US</span>
</li>
<li class="normal_menu mobile_menu_toggle current_page_item">
<span>SOLUTIONS</span>
</li>
<li class="normal_menu mobile_menu_toggle current_page_item">
<span>CONTACT US</span>
</li>
</ul>
</div>
</nav>
<!-- End Nav -->
<div class="clear"></div>
</div>

Try this code..
overwrite the bootstrap container width
#media screen and (max-width: 768px) {
body .container{
width:100% !important;
}
}

Related

How do i make my nav-bar items stretch across the screen responsively

I'm wanting items in my nav bar to stretch across the width of the screen when on lets say a laptop, and go one-under another when on a phone.
Also, I don't like how my items are pushed over to the left , i want them to be equally spaced across the screen.
HTML:
<!-- Logo -->
<div class="navbar navbar-default navbar-fixed-top" role="">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">
<img src="assets/images/BridgmanLogo.png" alt="Logo">
</a>
</div>
</div>
</div>
<!-- SLIDER -->
<header class="container-fluid intro-slider">
<div class="bg-slider-wrapper">
<div id="bg-slider" class="flexslider bg-slider">
<ul class="slides">
<li class="slide slide-1">
<div class="push-text-slide"></div>
<section class="home-promo">
<div class="text-center">
<h2 class="titlepro">
<span class="upper">Welcome to</span>
<span class="middle"><strong>Bridgman IBC Ltd</strong></span>
<span class="bottom">An Example Tag Line Goes Here</span></h2>
<span class="glyphicon glyphicon-shopping-cart"></span><i></i>Shop
</div>
</section>
</li>
<li class="slide slide-2">
<div class="push-text-slide"></div>
<section class="home-promo">
<div class="text-center">
<h2 class="titlepro">
<span class="upper">Welcome to</span>
<span class="middle"><strong>Bridgman IBC Ltd</strong></span>
<span class="bottom">An Example Tag Line Goes Here</span></h2>
<span class="glyphicon glyphicon-shopping-cart"></span><i></i>Shop
</div>
</section>
</li>
<li class="slide slide-3">
<div class="push-text-slide"></div>
<section class="home-promo">
<div class="text-center">
<h2 class="titlepro">
<span class="upper">Welcome to</span>
<span class="middle"><strong>Bridgman IBC Ltd</strong></span>
<span class="bottom">An Example Tag Line Goes Here</span></h2>
<span class="glyphicon glyphicon-shopping-cart"></span><i></i>Shop
</div>
</section>
</li>
</ul>
</div>
</div>
</header>
<!-- NAVIGATION BAR -->
<div class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-brand">
<ul class="nav navbar-nav navbar-right">
<li class="active"><span class="glyphicon glyphicon-home"></span> Home
</li>
<li>About
</li>
<li>Specifying
</li>
<li>Market Sectors
</li>
<li>Shop
</li>
</ul>
</div>
</div>
</div>
If I understand you correctly, there are some changes you should do:
Read the css I added. I'm using flex to stretch the item equally in the menu.
Remove the .container div to stretch the navigation to the width of the window.
Remove the .navbar-right class from the navigation you don't need it.
I didn't take care about the mobile I'm sure you know how to do all those changes in desktop only using media query.
.navbar-brand, .navbar-nav, .navbar-nav>li {
float:none !important;
}
.navbar-nav {
display:flex;
}
.navbar-nav>li {
flex: 1;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- NAVIGATION BAR -->
<div class="navbar navbar-default" role="navigation">
<!--<div class="container">-->
<div class="navbar-brand">
<ul class="nav navbar-nav">
<!--<ul class="nav navbar-nav navbar-right">-->
<li class="active"><span class="glyphicon glyphicon-home"></span> Home
</li>
<li>About
</li>
<li>Specifying
</li>
<li>Market Sectors
</li>
<li>Shop
</li>
</ul>
</div>
<!--</div>-->
</div>
http://jsbin.com/wisuyi/edit?html,css
You will have to use media queries to get responsive view.
.navbar-brand{
width:100%;
display:inline-block;
}
.navbar-brand ul li{
width:20%;
/*Adjust the percent based on 100/number of items (Here it is 5)*/
min-width:150px;
/*Keep a minimum width such that the text does not overflow*/
display:inline-block;
text-align:center;
}
/*Write media queries for Mobile and tablets*/
#media (max-width: 420px) {
.navbar-brand ul li{
width:100%;
}
}

Foundation nav bar acting weird

I use foundation 6 to build my website. Only a problem occurs when I shrink the size of my window.
Picture of my website
Does somebody know how to fix this?
An answer is appreciated.
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><a href="#"><b>Pimg</b>
</a>
</h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li> <div class="entypo-home entipo"></div></li>
<li> <div class="entypo-picture entipo"></div></li>
<li> <div class="entypo-upload entipo"></div></li>
<li> <div class="entypo-user entipo"></div></li>
</ul>
<ul class="left">
<li>Log out</li>
<li class="has-form">
<div class="row collapse">
<div class="medium-8 columns">
<input type="text" placeholder="Search...">
</div>
<div class="medium-4 columns">
Search
</div>
</div>
</li>
</ul>
</section>
</nav>

center align menu in Bootstrap

Already try other solutions from this community, but nothing seams to work!!
I want to horizontally center the menu. The "logo" is left align on top of it.
Here is the code (no changes to css that matter to this):
<nav class="navbar navbar-default navbar-fixed-top">
<div class="col-lg-2">
</div>
<div class="col-lg-8">
<img class="logo" src="images/logo.png" />
<ul class="nav nav-pills">
<li>
<a href="#"><img src="images/menu/123.png" />
</a>
</li>
<li>
<a href="#"><img src="images/menu/456.png" />
</a>
</li>
<li>
<a href="#"><img src="images/menu/789.png" />
</a>
</li>
</ul>
</div>
<div class="col-lg-2">
</div>
</nav>
Edit: This solved the problem
ul {
width: 825px;
margin: auto;
}
Try changing this <div class="col-lg-8"> to this <div class="col-lg-8 col-lg-push-2 center-block">
Get rid of the two empty <div class="col-lg-2">
Try out this codes,
Bootstrap Centered Navigation
Bootstrap Centered Menu
well, solved:
ul {
width: 825px;
margin: auto;
}

How to i keep my logo from overlapping on to my main menu bar when i open on an tablet

For some reason when ever i open my web page on a table the logo increase size and covers the links in my main menu bar.
here is my source code and css..
<div class="container">
<div class="logo"><a class="brand" href="index.html"><img src="../Website/SCM Logo.png" alt="optional logo"> </div>
<div id="mainmenu" class="menu_container">
<label class="mobile_collapser">MENU</label>
<!-- Mobile menu title -->
<ul>
<li class="active"></li>
<!-- Must create links here -->
<li>Mechanical</li>
<li>Electrical</li>
<li>Communication</li>
<li>Contact</li>
</ul>
</div>
<div class="triangle-up-left"></div>
<div class="triangle-up-right"></div>
</div>
</header>
You can try specifying a percentage size for you logo ex(style="max-height:50%; max-width:50%"). This will allow it to scale to different devices, and hopefully it will stop covering your main menu
Your a tag is not complete. Check following:
<div class="logo">
<a class="brand" href="index.html">
<img src="../Website/SCM Logo.png" alt="optional logo" />
</a>
</div>

Add a full width image above a Bootstrap navbar

I am trying to insert an image above a navbar, but I it is not working for me. Here is my html:
<div class="wrapper" />
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li class="active">
<a class="brand" href="#">Home</a>
</li>
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div>
</div>
</div>
and my css:
.wrapper {
background-image: url(../assets/bridge.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 250px;
}
Anytime I add a div or any content, it is pushed to the top of the page. I can add padding, but when I start to resize the screen it breaks and leaves a gap in the image and the navbar. Any help would be great.
<div /> means <div> in HTML 5 and not <div></div> as it does in XHTML. Div's are not valid self closing tags.
Ref
Demo
<div class="wrapper"></div>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li class="active">
<a class="brand" href="#">Home</a>
</li>
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div>
</div>
</div>
The issue is /> at the end of .wrapper, because it is not allowed (depending on your doctype). Remove it and give it </div> like the other divs, I think it's going to work.