Bootstrap Toggle menu not working in mobile view - html

I created a testing file using bootstrap. I called the bootstrap.min.css in the head section of the webpage.
Also, I called few JavaScript files before closing the body tag.
But now as I want to create a toggle menu this will become a drop down menu when seen in mobile version, the toggle button is not working. Here is the code of Toggle button.
I want to know that what is the reason behind that. Why the toggle button is not working correctly?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Testing of Bootstrap</title>
<meta name-"viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/home/user/Testing/bootstrap/css/bootstrap.min.css">
</head>
<body>
<div class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-ctoggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">Home</li>
<li>About Us</li>
<li>Contact Us</li>
<li class="dropdown">Themes<b class="caret"></b>
<ul class="dropdown-menu">
<li class="dropdown-header">Admin & Dashboard</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<h1>Testing H1</h1>
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-6">Box 1</div>
<div class="col-md-4 col-sm-6">Box 2</div>
<div class="col-md-4 col-sm-6">Box 3</div>
<div class="clearfix visible-md-block"></div>
<div class="col-md-4 col-sm-6">Box 4</div>
<div class="col-md-4 col-sm-6">Box 5</div>
<div class="col-md-4 col-sm-6">Box 6</div>
<div class="clearfix visible-md-block"></div>
<div class="col-md-4 col-sm-6">Box 7</div>
<div class="col-md-4 col-sm-6">Box 8</div>
<div class="col-md-4 col-sm-6">Box 9</div>
<div class="clearfix visible-md-block"></div>
<div class="col-md-4 col-sm-6">Box 10</div>
<div class="col-md-4 col-sm-6">Box 11</div>
<div class="col-md-4 col-sm-6">Box 12</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="/home/user/Testing/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
Image link: http://i.stack.imgur.com/tRBaV.png

There is typo mistake in your code which I corrected it. You wrote 'data-ctoggle' instead data-toggle
Correct code: <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Testing of Bootstrap</title>
<meta name-"viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="http://getbootstrap.com/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="http://getbootstrap.com/examples/navbar/navbar.css">
</head>
<body>
<nav class="navbar navbar-default" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">Home</li>
<li>About Us</li>
<li>Contact Us</li>
<li class="dropdown">Themes<b class="caret"></b>
<ul class="dropdown-menu">
<li class="dropdown-header">Admin & Dashboard</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<h1>Testing H1</h1>
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-6">Box 1</div>
<div class="col-md-4 col-sm-6">Box 2</div>
<div class="col-md-4 col-sm-6">Box 3</div>
<div class="clearfix visible-md-block"></div>
<div class="col-md-4 col-sm-6">Box 4</div>
<div class="col-md-4 col-sm-6">Box 5</div>
<div class="col-md-4 col-sm-6">Box 6</div>
<div class="clearfix visible-md-block"></div>
<div class="col-md-4 col-sm-6">Box 7</div>
<div class="col-md-4 col-sm-6">Box 8</div>
<div class="col-md-4 col-sm-6">Box 9</div>
<div class="clearfix visible-md-block"></div>
<div class="col-md-4 col-sm-6">Box 10</div>
<div class="col-md-4 col-sm-6">Box 11</div>
<div class="col-md-4 col-sm-6">Box 12</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://getbootstrap.com/dist/js/bootstrap.min.js"></script>
</body>
</html>

check this line to see if it points correctly or not
<script src="/home/user/Testing/bootstrap/js/bootstrap.min.js"></script>
or
Download the core files from http://getbootstrap.com/getting-started/#download
Replace the javascript code as the following
<script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>

Related

boostrap panel-heading with row causing border stick to panel-body padding width

I'm trying to set a collapsible panel inside a collapsible panel but I have a need for the nested panel to have 3 columns in the heading so I'm using a row. The issue is as soon as I add the row and container-fluid classes, the bottom border of the panel heading is sticking to the width of the panel-body padding width. See below how the panel heading border does not span across the entire panel-heading.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>test</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body style="padding-top:10px"></body>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapseum1">This is a test</a>
</h4>
</div>
<div id="collapseum1" class="panel-collapse collapse">
<div class="panel-body">
<b>Description:</b> idk
<div class="panel panel-info container-fluid">
<div class="panel-heading row">
<div class="col-xs-1"><h4 class="panel-title"><a data-toggle="collapse" href="#collapseum1sub1"><b>Col1</b></a></h4></div>
<div class="col-xs-3 text-left">Col2</div>
<div class="col-xs-8 text-left">Col3</div>
</div>
<div id="collapseum1sub1" class="panel-collapse collapse">
<div class="panel-body">
<b>More stuff</b>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
It's usually not a good idea to combine classes that do a lot on a single element. Also, you don't really need a container at all since the heading has appropriate padding. So move the row inside the heading element and keep it separate:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>test</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body style="padding-top:10px"></body>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapseum1">This is a test</a>
</h4>
</div>
<div id="collapseum1" class="panel-collapse collapse">
<div class="panel-body">
<b>Description:</b> idk
<div class="panel panel-info">
<div class="panel-heading">
<div class="row">
<div class="col-xs-1">
<h4 class="panel-title"><a data-toggle="collapse" href="#collapseum1sub1"><b>Col1</b></a></h4>
</div>
<div class="col-xs-3 text-left">Col2</div>
<div class="col-xs-8 text-left">Col3</div>
</div>
</div>
<div id="collapseum1sub1" class="panel-collapse collapse">
<div class="panel-body">
<b>More stuff</b>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Gif does not appear when clicking button

This is the code :
<button class="fun" data-toggle="collapse" data-target="emoji">Click For Fun!</button>
<div id="emoji" class="collapse">
<div class="container-fluid padding">
<div class="row text-center">
<div class="col-sm-6 col-md-3">
<img class="gif" src="img/gif/panda.gif">
</div>
</div>
</div>
</div>
The button has the data target set to "emoji" but when I click the button nothing happens.
data-target="#emoji" will solve your problem.
<button class="fun" data-toggle="collapse" data-target="#emoji">Click For Fun!</button>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<button class="fun" data-toggle="collapse" data-target="#emoji">Click For Fun!</button>
<div id="emoji" class="collapse">
<div class="container-fluid padding">
<div class="row text-center">
<div class="col-sm-6 col-md-3">
<img class="gif" src="https://media0.giphy.com/media/Tia2InBEWaQgckP3UG/source.gif">
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>

Bootstrap 4 - Vertically align a div to a bottom of a column

I have a two-column layout with one element on the left and two on the right.
How can I keep the last element inside the right column aligned relatively to the bottom of the left column?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Bare - Start Bootstrap Template</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
<div class="container">
<a class="navbar-brand" href="#">Start Bootstrap</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid">
<div class="row">
<div class="col-7">
<div class="card card-block">
<h3>Column 1</h3>
<br />
<br />
<br />
<p>..end of content</p>
</div>
</div>
<div class="col-5">
<div class="row no-gutters">
<div class="col-12">
<div class="card card-block">
<h3>Column 2</h3>
</div>
</div>
<div class="col-12 align-self-end">
<div class="card card-block">
<h3>Column 3</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
Thank you for your help!
By adding the .align-items-end to the parent row, it vertically aligns the columns to bottom of it.
If you want to have the column number 3 on the top but preserve the current position of column 4, I would suggest for you to take a look in to a jQuery library called eqHeight. This would allow you to stretch the parent columns (col-7 and col-5) to same height, after which the column number 3 should be on top with column 1.
<!-- Page Content -->
<div class="container-fluid">
<div class="row align-items-end">
<div class="col-7">
1<br>
<br>
<br>
2
</div>
<div class="col-5">
<div class="col-12">
3
</div>
<div class="col-12 align-self-end">
4
</div>
</div>
</div>
</div>
Why not use different row for 1 - 3 and 2 - 4.
Because you have using bootstrap grid system.
7 col - 5 col
-------------
Bootstrap two column layout
Kindly add style in fourth column div.
style="position: absolute;bottom: 0px;"
<!-- Page Content -->
<div class="container-fluid">
<div class="row">
<div class="col-7">
1 <br />
<br />
<br />
<br />
2
</div>
<div class="col-5">
<div class="row no-gutters">
<div class="col-12 align-self-end">
3
</div>
</div>
<div class="row no-gutters" >
<div class="col-12 align-self-end" style="position: absolute;
bottom: 0px; ">
4
</div>
</div>
</div>
</div>
</div>
This could be what you are looking for:
<div class="row">
<div class="col-md-6">
1
</div>
<div class="col-md-6">
3
</div>
</div>
<div class="row">
<div class="col-md-6">
2
</div>
<div class="col-md-6">
4
</div>
</div>
OR
<div class="row">
<div class="col-md-6">
1
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
2
</div>
<div class="col-md-12">
3
</div>
</div>
</div>
</div>
<div class="col-5">
<row class="no-gutters">
<div class="col-lg-12">
3
</div>
<div class="col-lg-12">
4
</div>
</row>
</div>
It will take full width in any screen size.

inappropriate behaviour on bootstrap tabs

I have a issue with tabs on Bootstrap:
I coded a page that's is suppose to be full width/height and the navbar would be the tabs.
I don't know why when I click on any tab button, It brings me a weird transition that isn't supposed to be there.
I just need a static tab menu, out off any transitions
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daniel</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="navarea transition-width">
<nav role="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Menu</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand">
LOGO
</a>
</div>
<div id="navbarCollapse" class="collapse navbar-collapse" data-toggle="collapse" data-target="#navbarCollapse">
<ul class="nav navbar-nav">
<li class="active">Tab1</li>
<li>Tab2</li>
<li>Tab3</li>
<li>Tab4</li>
<li>Tab5</li>
</ul>
</div>
</div>
</nav>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="tab-content text-center">
<div class="tab-pane active" id="tab1">
<br>
<br>
<br>
<h1>TAB 1</h1>
</div>
<div class="tab-pane" id="tab2">
<div class="tab-content text-center">
<div class="tab-pane active" id="tab1">
<br>
<br>
<br>
<h1>TAB 2</h1>
</div>
</div>
</div>
<div class="tab-pane" id="tab3">
<div class="tab-content text-center">
<br>
<br>
<br>
<h1>TAB 3</h1>
</div>
</div>
<div class="tab-pane" id="tab4">
<br>
<br>
<br>
<h1>TAB 4</h1>
</div>
<div class="tab-pane" id="tab5">
<br>
<br>
<br>
<h1>TAB 5</h1>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
Is better if you check out the snippet by full screen;
There's a lot of fluff in here that you probably don't need, but I removed one of the
data-target="#navbarCollapse"
and it stopped animating
Found this example on w3schools that you could probably check out as well:
https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_tabs_dynamic&stacked=h
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daniel</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="navarea transition-width">
<nav role="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Menu</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand">
LOGO
</a>
</div>
<div id="navbarCollapse" class="collapse navbar-collapse" data-toggle="collapse">
<ul class="nav navbar-nav">
<li class="active">Tab1</li>
<li>Tab2</li>
<li>Tab3</li>
<li>Tab4</li>
<li>Tab5</li>
</ul>
</div>
</div>
</nav>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="tab-content text-center">
<div class="tab-pane active" id="tab1">
<br>
<br>
<br>
<h1>TAB 1</h1>
</div>
<div class="tab-pane" id="tab2">
<div class="tab-content text-center">
<div class="tab-pane active" id="tab1">
<br>
<br>
<br>
<h1>TAB 2</h1>
</div>
</div>
</div>
<div class="tab-pane" id="tab3">
<div class="tab-content text-center">
<br>
<br>
<br>
<h1>TAB 3</h1>
</div>
</div>
<div class="tab-pane" id="tab4">
<br>
<br>
<br>
<h1>TAB 4</h1>
</div>
<div class="tab-pane" id="tab5">
<br>
<br>
<br>
<h1>TAB 5</h1>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>

Hamburger drop-down menu not working when page is in "mobile" size on desktop

my hamburger button isn't working when I minimize the page to mobile size. Everything else seems to flow correctly, I've checked numerous times on the code and it seems to be correct. At this point, I'm not sure whether it's the script codes I have down below which disables the drop-down menu or what?
<!DOCTYPE html>
<html>
<head>
<title>Image Gallery</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="gallery.css">
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" date-target="#bs-nav-demo" 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>
<span class="glyphicon glyphicon-picture" aria-hidden="true"></span> IMAGES
</div>
<div class="collapse navbar-collapse" id="bs-nav-demo-1">
<ul class="nav navbar-nav">
<li>About</li>
<li>Contact</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1><span class="fas fa-camera-retro"></span> The Image Gallery</h1>
<p>Wonderful pictures at your disposal!</p>
</div>
<div class="row">
<div class="col-lg-4 col-sm-6" >
<div class="thumbnail">
<img src="http://i.imgur.com/qK42fUu.jpg">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1435771112039-1e5b2bcad966?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1442406964439-e46ab8eff7c4?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439524970634-649c37a69e5c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1450&h=825&fit=crop&s=bfda9916c885869b43b70738693428d9">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1444090542259-0af8fa96557e?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1434543177303-ef2cc7707e0d?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1436262513933-a0b06755c784?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439396087961-98bc12c21176?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439694458393-78ecf14da7f9?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
</div>
</div>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html>
-> please update following code into your existing code.
-> must be same id name into button data-target name and collapse id name.
-> also add meta tag into head tag.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image Gallery</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="gallery.css">
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-nav-demo-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>
<span class="glyphicon glyphicon-picture" aria-hidden="true"></span> IMAGES
</div>
<div class="collapse navbar-collapse" id="bs-nav-demo-1">
<ul class="nav navbar-nav">
<li>About</li>
<li>Contact</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1><span class="fas fa-camera-retro"></span> The Image Gallery</h1>
<p>Wonderful pictures at your disposal!</p>
</div>
<div class="row">
<div class="col-lg-4 col-sm-6" >
<div class="thumbnail">
<img src="http://i.imgur.com/qK42fUu.jpg">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1435771112039-1e5b2bcad966?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1442406964439-e46ab8eff7c4?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439524970634-649c37a69e5c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1450&h=825&fit=crop&s=bfda9916c885869b43b70738693428d9">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1444090542259-0af8fa96557e?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1434543177303-ef2cc7707e0d?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1436262513933-a0b06755c784?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439396087961-98bc12c21176?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439694458393-78ecf14da7f9?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
</div>
</div>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html>