Bootstrap Fixed Navigation float line and text over - css

Bear with me.
So I have a standard navigation with the minor change that it is set to 150px tall in the css so the larger logo will fit in it on the left where "brand" usually is in the demos.
What I would like to do is something like this - The last three items are all services. I don't really want a drop down so I'd like to have
----------------------Services---------------------- Assesments Improvements Incident Response above it. Normally I'd work all that out on the page with a div but in this case I can't figure out how to add it to the UL for the menu.
Any idea how to do that maybe with a :before or something?
HTML:
<div class="collapse navbar-collapse" id="topFixedNavbar1">
<ul class="nav navbar-nav navbar-right">
<li>About</li>
<li>News</li>
<li>Contact</li>
<li>Assessments</li>
<li>Improvements</li>
<li>Incident Response</li>
</ul>
</div>

You pretty much can insert a div if you want: maybe this will help you get started.
Navbar-collapse is split between two separate navbar-nav elements with the new services class inside the second, above your second set of links.
body,
html {
margin-top: 175px;
}
.navbar.navbar-custom {
height: 150px;
border-bottom: 4px solid #444;
}
.navbar-custom .services {
color: #444;
font-size: 18px;
font-weight: 700;
text-align: center;
margin-top: -25px;
}
.navbar-custom .navbar-nav {
margin-top: 45px;
}
.navbar-custom .navbar-right .navbar-nav > li > a {
font-size: 12px;
}
#media (max-width: 767px) {
.navbar-custom .services {
text-align: left;
padding-left: 15px;
padding-top: 20px;
}
.navbar-custom .navbar-toggle,
.navbar-custom .navbar-collapse {
margin-top: 55px;
background: #f5f5f5;
border: none;
}
.navbar-custom .navbar-nav {
margin-top: 15px;
}
.navbar-custom .navbar-right .navbar-nav > li > a {
font-size: 14px;
}
}
<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" />
<nav class="navbar navbar-default navbar-fixed-top navbar-custom">
<div class="container-fluid">
<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="#">
<img src="http://placehold.it/200x115/444/fff?text=Logo">
</a>
</div>
<div class="collapse navbar-collapse navbar-right" id="topFixedNavbar1">
<ul class="nav navbar-nav">
<li>About
</li>
<li>News
</li>
<li>Contact
</li>
</ul>
<ul class="nav navbar-nav">
<div class="services">Services</div>
<li>Assessments
</li>
<li>Improvements
</li>
<li>Incident
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="well wel-lg">Some Junk</div>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>

Related

How to position text on the right side of an image

I want to place my paragraph text on the right side of an image, just like in this mockup:
https://imgur.com/a/ArDIEqH
I aligned the text by setting the display of the parent to flex and it now looks like this:
https://imgur.com/a/wECtedW
The text is dropping on a new line on each word, how can I make it look like in the mockup?
.zodiac-info {
width: 500px;
}
.blog-entry-name {
padding: 0px;
}
.zodiac-paragraph {
color: black;
width: 200px;
}
.blog-entry-container {
margin-top: 100px;
margin-left: 250px;
}
.blog-entry {
display: flex;
}
```
<section class="zodiac-info">
<div class="blog-entry-container">
<input type="search" class="search-box fa fa-search" placeholder=" &#xf002 search">
<div class="blog-entry">
<img src="../assets/images/test-image.jpg" alt="test image" class="test-img">
<p class="zodiac-paragraph">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="blog-entry">
<img src="../assets/images/test-image.jpg" alt="test image" class="test-img">
<p class="zodiac-paragraph">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="blog-entry">
<img src="../assets/images/test-image.jpg" alt="test image" class="test-img">
<p class="zodiac-paragraph">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
</section>
I just update your code with few CSS changes. Try this I hope it'll help you out. Thanks
.zodiac-info {
margin: 100px auto 0;
padding: 0 20px;
}
.blog-entry {
display: flex;
margin-top: 20px;
}
.blog-entry img {
flex-shrink: 0;
height: 120px;
width: 120px;
}
.blog-detail {
color: black;
margin-left: 10px;
}
.blog-detail label {
font-weight: bold;
}
.blog-detail p {
margin: 5px 0;
}
.blog-detail small {
font-style: italic;
}
<section class="zodiac-info">
<div class="blog-entry-container">
<input type="search" class="search-box fa fa-search" placeholder=" &#xf002 search">
<div class="blog-entry">
<img src="https://i.stack.imgur.com/o6bz4.gif" alt="test image" class="test-img">
<div class="blog-detail">
<label>Heading 1</label>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<small>Date: 02-04-2019</small>
</div>
</div>
<div class="blog-entry">
<img src="https://i.stack.imgur.com/o6bz4.gif" alt="test image" class="test-img">
<div class="blog-detail">
<label>Heading 1</label>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<small>Date: 02-04-2019</small>
</div>
</div>
<div class="blog-entry">
<img src="https://i.stack.imgur.com/o6bz4.gif" alt="test image" class="test-img">
<div class="blog-detail">
<label>Heading 1</label>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<small>Date: 02-04-2019</small>
</div>
</div>
</div>
</section>
use float: left and float: right to move the text and image all the way.
Since both the image and the paragraph are in the same div, you can use absolute and relative positioning.
.blog-entry {
position: relative;
}
.zodiac-paragraph, .test-img {
position: absolute;
}
Try to look at this codepen if this solves your prob.
https://codepen.io/jls314/pen/EJjVzK
You can use css grid or flexbox. You use flexbox, so:
.zodiac-info {
display: flex;
justify-content: center;
}
.blog-entry {
display: flex;
align-items: center;
padding: 1rem 0;
}
.blog-entry-name {
padding: 0px;
}
.zodiac-paragraph {
color: black;
}
.blog-entry img {
width: 180px;
height: 180px;
min-height: 180px;
object-fit: cover;
flex: 1;
}
p.zodiac-paragraph {
padding: 0 0 0 1rem;
margin: 0;
}
.blog-entry-container {
display: flex;
flex-direction: column;
}
<section class="zodiac-info">
<div class="blog-entry-container">
<input type="search" class="search-box fa fa-search" placeholder=" &#xf002 search">
<div class="blog-entry">
<img src="https://cdn-images-1.medium.com/max/1200/1*eXIBeNlLhz4Pe6vDrYkXLQ.png" alt="test image" class="test-img"></p>
<p class="zodiac-paragraph">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="blog-entry">
<img src="https://cdn-images-1.medium.com/max/1200/1*eXIBeNlLhz4Pe6vDrYkXLQ.png" alt="test image" class="test-img">
<p class="zodiac-paragraph">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="blog-entry">
<img src="https://cdn-images-1.medium.com/max/1200/1*eXIBeNlLhz4Pe6vDrYkXLQ.png" alt="test image" class="test-img">
<p class="zodiac-paragraph">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum..</p>
</div>
</div>
</section>
You can try this
.blog-entry{display: in-line-block}

Safari Browser Overlapping DIV Content

I am not an expert developer and have limited knowledge about CSS. I am facing overlapping problem in Safari and Internet Explorer 10+.
In Firefox, Google Crome and Opera my code is working fine but in
Safari and IE - text are overlapping.
Please supply a whole CSS code as I do not know much of it.
My code is as below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing:
border-box; box-sizing: border-box; }
*{box-sizing: border-box; padding: 0; margin: 0;}
body { margin: 0;}
footer { border: 1px solid #ccc; padding: 1.25em; background-color: #c0c0c0;
}
.max-width {max-width: 1400px; margin: 0 auto;}
.site-container { position: relative; margin: .5em; }
.left-column { border: 2px solid #ccc; padding: 0.40em; }
.right-column { border: 0px solid #ccc; padding: 1.25em; background-color:
#ffffff; }
.floating-inline{display: inline-block;vertical-align: middle;}
.nav { list-style: none; margin-left: 0; margin-bottom: 0; padding-left: 0;
}
img {
max-width: 100%;
height: auto;
}
header{position: fixed; left: 0; top: 0; width: 100%; height: 70px;
background: #6633cc; z-index: 3; color: #fff; text-align:center; font-size:
20px; padding: 10px 0;}
.panel{ height: 100%; position: absolute; top: 0 }
.center{padding:0px 190px 0 207px; position: absolute; width:100%; top: 0;
left: 0; background: #ffff99; overflow-y:scroll}
.left{ padding: 5px 0 0 0; left: 0; width:200px; background: #0f0; z-
index:2;}
.right{ padding: 5px 0 0 0; right: 0; width: 200px; background: #f00; z-
index:2;}
#media (max-width: 1024px) {
.left { display: none; }
.right { display: none; }
.center{padding:0px 6px 0 10px; position: absolute; width:100%; top: 0;
left: 0; background: #ccffcc; overflow-y:scroll}
}
/* MEDIA QUERIES */
#media screen and (min-width: 47.5em )
{
.left-column { margin-right: 22.5em; }
.right-column { position: absolute; top: 0; right: 0; width: 21.75em; }
}
</style>
</head>
<body>
<header>
Nevigation Menus Goes here <br>
Menu 1 , Menu 2, Menu 3 <br>
</header>
<nav class="left panel" align="center">
<br><br><br> <img src="196 x1000-Left.jpg" width="196" height="650"
border="0" alt="img">
</nav>
<aside class="right panel" align="center">
<br><br><br>
<img src="196 x1000-Left.jpg" width="196" height="650" border="0" alt="img">
</aside>
<section class="center panel"> <br><br><br><br><br>
<div class="max-width">
<div class="site-container">
<main class="left-column">
<h2>Left Column (fluid)</h2><br>
<p align="justify" >
<b>1st Para </b> : Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the
1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum
<br> <br>
<b>2nd Para </b>: Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the
1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum
<br> <br>
<br> <br>
<b>3rd Para </b>:Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the
1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum
<br> <br>
<b>4th Para </b> :Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the
1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum
<br> <br>
<b>5th Para </b> : Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the
1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum</p>
</main>
<aside class="right-column">
<h2>Right Column</h2><br>
<h4> This Flots below Left Column while resizing </h4>
<br>
<p align="justify">Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a type
specimen book. It has survived not only five centuries, but also the
leap into electronic typesetting, remaining essentially unchanged. It
was popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem
Ipsum</p>
<br>
</aside>
</div>
<footer>
<div id="my_menu" align="center">
Home | Bloggs
| Contact
</div>
</footer>
</div>
</section>
</body>
</html>
Snapshot of problem: https://i.stack.imgur.com/PLcQd.jpg
Finally I got the answer... It was so simple....Just one word...
Removing
<main class="left-column">
Above -
Left Column (fluid)
Just adding
<aside class="full-width-aside left-column">
THATS ALL. It finally Solved my Problem

Bootstrap navbar collapse issue with multiple headers

here is my code.
<header class="navbar-inverse navbar-fixed-top wet-asphalt">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse">
Call now!
</button>
</div>
<div class="collapse **navbar-collapse**">
<ul class="nav navbar-nav navbar-right" style="margin-top:0px;">
<li>9XXXXXXXXX</li>
<li>mail us</li>
</ul>
</div>
</div>
</header>
<header class="navbar navbar-inverse wet-asphalt" role="banner" style="margin-top: -46px; border-radius:0px;">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" style="margin-top: 25px;">
<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.html"><img src="images/logo.png" alt="logo"></a>
</div>
<div class="collapse **navbar-collapse**">
<ul class="nav navbar-nav navbar-right">
<li class="active">Home</li>
<li>About Us</li>
</ul>
</div>
</div>
</header>
When I click on second header menu, while viewing this on a Mobile device. It triggers both navbar-collapse. When I remove navbar-collapse class from first header it disappears.
I dont want the class to be removed from my first header too and also dont want it to collapse.
Please help me to sort out. I am new with Bootstrap.
If you're trying to keep the links in the first navbar exposed at all times while keeping the standard collapse function for the section just use two separate navbars but remove the collapse function (the navbar-header section) from the first. Then you can surround both navs with the navbar-fixed-top class.
*The only CSS that needs to be applied is to keep your first navs links inline on device sizes.
Working Example:
body {
padding-top: 120px;
}
.navbar-inverse.navbar-top ul > li {
display: inline-block;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar-fixed-top">
<div class="navbar-inverse navbar-static-top navbar-top">
<div class="container">
<ul class="nav navbar-nav pull-right">
<li>123 456-7890
</li>
<li>Mail Us
</li>
</ul>
</div>
</div>
<div 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="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="#">
<img src="http://placehold.it/50x25/fff/fff">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav">
<li class="active">Home
</li>
<li>About Us
</li>
</ul>
</div>
</div>
</div>
</nav>
<div class="container">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</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>
This is happening because their data-target are same. Give them both different, for example data-target=".navbar-collapse-1" and data-target=".navbar-collapse-2"
And each data-target should point to the corresponding container class. First div will have first class <div class="collapse navbar-collapse-1"> and second one should have the other one <div class="collapse navbar-collapse-2">
Here's your working code.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<header class="navbar-inverse navbar-fixed-top wet-asphalt">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
Call now!
</button>
</div>
<div class="collapse navbar-collapse-1">
<ul class="nav navbar-nav navbar-right" style="margin-top:0px;">
<li>9XXXXXXXXX</li>
<li>mail us</li>
</ul>
</div>
</div>
</header>
<header class="navbar navbar-inverse wet-asphalt" role="banner" style="margin-top: 150px; border-radius:0px;">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-2" style="margin-top: 25px;">
<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.html"><img src="images/logo.png" alt="logo"></a>
</div>
<div class="collapse navbar-collapse-2">
<ul class="nav navbar-nav navbar-right">
<li class="active">Home</li>
<li>About Us</li>
</ul>
</div>
</div>
</header>

My Navigation Bar Doesn't Work... Need help. Bootstrap

need your help. I am trying to create a collapsing navigation bar for our project website in school. Since I am just starting to learn bootstrap, I can not see what have I done wrongfully.
Thanks in advance.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="../css/bootstrap.min.css" rel="stylesheet" />
<link href="../css/mystyle.css" rel="stylesheet" />
<title></title>
</head>
<body>
<div class="container">
<div class="navbar navbar-default navbar-static-top">
<div class="container">
<a class="navbar-brand" href="#">Viking's Pawnshop</a>
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right" style="margin-right: 20px">
<li>Home</li>
<li>Services</li>
<li>Contact Us</li>
<li>Login</li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="slide_cont">
<div class="slide">
<div class="1">
</div>
<div class="2">
</div>
<div class="3">
</div>
</div>
<div class="arrows">
<img src="../images/left.png" id="lft">
<img src="../images/right.png" id="ryt">
</div>
</div>
</div>
</div>
<div class="row" style="text-align: justify;">
<div class="col-md-4">
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div class="col-md-4">
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div class="col-md-4">
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
</div>
</body>
</html>
Requires JavaScript plugin
Check the Documentation: Navbar
You need to include both jQuery and (at the least) the collapse.js plugin or the full bootstrap.js for your collapsing nav to function. See What's Included
jQuery required Please note that all JavaScript plugins require jQuery
to be included, as shown in the starter template. Consult our
bower.json to see which versions of jQuery are supported.
Also.
align is deprecated, see W3C Specs.
Since you're placing the nav inside of a container, you can use container-fluid inside the navbar so there isn't any overflow on the navbar-right links. See this Example.
You're missing the .navbar-header class.
Working Example:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Viking's Pawnshop</a>
</div>
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right">
<li>Home
</li>
<li>Services
</li>
<li>Contact Us
</li>
<li>Login
</li>
</ul>
</div>
</div>
</nav>
<div class="row">
<div class="col-md-12">
<div class="slide_cont">
<div class="slide">
<div class="1">
</div>
<div class="2">
</div>
<div class="3">
</div>
</div>
<div class="arrows">
<img src="http://placehold.it/150x150" id="lft">
<img src="http://placehold.it/150x150" id="ryt">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type
specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more
recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div class="col-md-4">
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type
specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more
recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div class="col-md-4">
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type
specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more
recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
</div>
<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>

I want bootstrap navigation to be always in collaped mode on all screen sizes as it renders on mobile devices

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
LOGO
</div>
<div class="navbar-collapse collapse" id="navbar">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About</li>
<li>Contact</li>
<li class="dropdown">
<a aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li>Action</li>
<li>Another action</li>
<li>Something else here</li>
<li class="divider" role="separator"></li>
<li class="dropdown-header">Nav header</li>
<li>Separated link</li>
<li>One more separated link</li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
Here's a working example of the CSS rules for the mobile nav that you'll need to reset to a different media query so they work across all viewports.
body,
html {
padding-top: 30px;
}
#media (max-width: 2500px) {
.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);
}
.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 .dropdown-menu > li > a,
.custom-navbar .navbar-nav .dropdown-menu > li > a:hover,
.custom-navbar .navbar-nav .dropdown-menu > li > a:focus {
color: #777;
}
.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;
}
}
<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" />
<nav class="navbar navbar-inverse custom-navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button"> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> LOGO
</div>
<div class="navbar-collapse collapse" id="navbar">
<ul class="nav navbar-nav">
<li class="active">Home
</li>
<li>About
</li>
<li>Contact
</li>
<li class="dropdown"> <a aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li>Action
</li>
<li>Another action
</li>
<li>Something else here
</li>
<li class="divider" role="separator"></li>
<li class="dropdown-header" role="separator">Nav header</li>
<li>One more separated link
</li>
</ul>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="well well-lg">Boostrap Mobile</div>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer
took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset
sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,
but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since
the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in
the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem
Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer
took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset
sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,
but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.</p>
</div>
It is just CSS.
For keeping the menu hamburger visible:
.navbar-toggle{
display:block !important;
}
And to prevent the menu from showing off in large screens:
#media (min-width: 768px){
.navbar-collapse{
display:none !important;
}
}

Resources