"Bootstrap 4 Carousel"
Bootstrap 4.1.1 Snippet by Oluwatimilehin Adesoji

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row blog"> <div class="col-md-12"> <div id="blogCarousel" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#blogCarousel" data-slide-to="0" class="active"></li> <li data-target="#blogCarousel" data-slide-to="1"></li> </ol> <!-- Carousel items --> <div class="carousel-inner"> <div class="carousel-item active"> <div class="row"> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> </div> <!--.row--> </div> <!--.item--> <div class="carousel-item"> <div class="row"> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> </div> <!--.row--> </div> <!--.item--> </div> <!--.carousel-inner--> </div> <!--.Carousel--> </div> </div> </div>
.blog .carousel-indicators { left: 0; top: auto; bottom: -40px; } /* The colour of the indicators */ .blog .carousel-indicators li { background: #a3a3a3; border-radius: 50%; width: 8px; height: 8px; } .blog .carousel-indicators .active { background: #707070; }
// optional $('#blogCarousel').carousel({ interval: 5000 });

Related: See More


Questions / Comments:

response to not working:

this works

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Untitled Document</title>

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

<style>

.blog .carousel-indicators {

left: 0;

top: auto;

bottom: -40px;

}

/ The colour of the indicators /

.blog .carousel-indicators li {

background: #a3a3a3;

border-radius: 50%;

width: 8px;

height: 8px;

}

.blog .carousel-indicators .active {

background: #707070;

}

</style>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">

<!------ Include the above in your HEAD tag ---------->

</head>

<body><p>&nbsp;</p>

<div class="container">

<div class="row blog">

<div class="col-md-12">

<div id="blogCarousel" class="carousel slide" data-ride="carousel">

<ol class="carousel-indicators">

<li data-target="#blogCarousel" data-slide-to="0" class="active"></li>

<li data-target="#blogCarousel" data-slide-to="1"></li>

</ol>

<!-- Carousel items -->

<div class="carousel-inner">

<div class="carousel-item active">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

<div class="carousel-item">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

</div>

<!--.carousel-inner-->

</div>

<!--.Carousel-->

</div>

</div>

</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" 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.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script>

$('#blogCarousel').carousel({

interval: 5000

});

</script>

</body>

</html>

hope this helps

https://mavcgraphics.com for more assistance,

mavcoop622 (-2) - 3 years ago - Reply -2


not working what is the reason:

<!doctype html>

<html lang="en">

<head>

<!-- Required meta tags -->

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<title>Hello, world!</title>

<style>

.blog .carousel-indicators {

left: 0;

top: auto;

bottom: -40px;

}

/ The colour of the indicators /

.blog .carousel-indicators li {

background: #a3a3a3;

border-radius: 50%;

width: 8px;

height: 8px;

}

.blog .carousel-indicators .active {

background: #707070;

}s

</style>

</head>

<body>

<div class="container">

<div class="row blog">

<div class="col-md-12">

<div id="blogCarousel" class="carousel slide" data-ride="carousel">

<ol class="carousel-indicators">

<li data-target="#blogCarousel" data-slide-to="0" class="active"></li>

<li data-target="#blogCarousel" data-slide-to="1"></li>

</ol>

<!-- Carousel items -->

<div class="carousel-inner">

<div class="carousel-item active">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

<div class="carousel-item">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

</div>

<!--.carousel-inner-->

</div>

<!--.Carousel-->

</div>

</div>

</div>

<!-- Optional JavaScript -->

<!-- jQuery first, then Popper.js, then Bootstrap JS -->

<script>

// optional

$('#blogCarousel').carousel({

interval: 5000

});

</script>

</body>

</html>

ahmedalnaqa (-6) - 4 years ago - Reply -6


response to not working:

this works

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

<style>

.blog .carousel-indicators {

left: 0;

top: auto;

bottom: -40px;

}

/ The colour of the indicators /

.blog .carousel-indicators li {

background: #a3a3a3;

border-radius: 50%;

width: 8px;

height: 8px;

}

.blog .carousel-indicators .active {

background: #707070;

}

</style>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">

<!------ Include the above in your HEAD tag ---------->

</head>

<body><p>&nbsp;</p>

<div class="container">

<div class="row blog">

<div class="col-md-12">

<div id="blogCarousel" class="carousel slide" data-ride="carousel">

<ol class="carousel-indicators">

<li data-target="#blogCarousel" data-slide-to="0" class="active"></li>

<li data-target="#blogCarousel" data-slide-to="1"></li>

</ol>

<!-- Carousel items -->

<div class="carousel-inner">

<div class="carousel-item active">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

<div class="carousel-item">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

</div>

<!--.carousel-inner-->

</div>

<!--.Carousel-->

</div>

</div>

</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" 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.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script>

$('#blogCarousel').carousel({

interval: 5000

});

</script>

mavcoop622 (-2) - 3 years ago - Reply 0


put <script> in the end of the html page

(this 2 lines)

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

But by best copy BootstrapCDN from original bootstrap page (https://getbootstrap.com/)

<!-- CSS only , HEAD tag-->

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

<!-- JS, Popper.js, and jQuery, in the end of HTML document-->

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" 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.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

diterns () - 3 years ago - Reply 0


put <script> in the end of the html page

(this 2 lines)

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

But by best copy BootstrapCDN from original bootstrap page (https://getbootstrap.com/)

<!-- CSS only , HEAD tag-->

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

<!-- JS, Popper.js, and jQuery, in the end of HTML document-->

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" 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.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

diterns () - 3 years ago - Reply 0


hi

ArpitaKP () - 1 year ago - Reply 0


response to not working:

this works

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

<style>

.blog .carousel-indicators {

left: 0;

top: auto;

bottom: -40px;

}

/ The colour of the indicators /

.blog .carousel-indicators li {

background: #a3a3a3;

border-radius: 50%;

width: 8px;

height: 8px;

}

.blog .carousel-indicators .active {

background: #707070;

}

</style>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">

<!------ Include the above in your HEAD tag ---------->

</head>

<body><p>&nbsp;</p>

<div class="container">

<div class="row blog">

<div class="col-md-12">

<div id="blogCarousel" class="carousel slide" data-ride="carousel">

<ol class="carousel-indicators">

<li data-target="#blogCarousel" data-slide-to="0" class="active"></li>

<li data-target="#blogCarousel" data-slide-to="1"></li>

</ol>

<!-- Carousel items -->

<div class="carousel-inner">

<div class="carousel-item active">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/flow-2.png" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

<div class="carousel-item">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="/Images/prettyflowers-3.png" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

</div>

<!--.carousel-inner-->

</div>

<!--.Carousel-->

</div>

</div>

</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" 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.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script>

$('#blogCarousel').carousel({

interval: 5000

});

</script>

mavcoop622 (-2) - 3 years ago - Reply 0


Not working code...

Dhanabalfast () - 3 years ago - Reply 0


how to add arrow instead of dot in slider

rockingnawaz () - 3 years ago - Reply 0


how to add arrow instead of dot in slider

rockingnawaz () - 3 years ago - Reply 0