Having problems with bootstrap carousel working with controls

Viewed 29

I am trying to implement a bootstrap carousel for testimonials but nothing seems to work. I have done exactly as the bootstrap website says, and nothing. I have tried using different versions of bootstrap and jquery with no result. I have retyped my code and tried stripping it down and I still can't find the issue. I know it's probably a simple fix but If anyone can help, it would be greatly appreciated.

HTML

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>Source</title>

  <!-- Google Fonts -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;900&display=swap" rel="stylesheet">

  <!-- CSS Stylesheets -->
  
  <script
  src="https://code.jquery.com/jquery-3.6.0.min.js"
  integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
  crossorigin="anonymous"></script>
  <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
 
  <link rel="stylesheet" href="css/styles.css">
  

  <!-- Font Awesome -->
  <script src="https://kit.fontawesome.com/4582c8b826.js" crossorigin="anonymous"></script>

  <!-- Bootstrap Scripts -->

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>
 
 
</head>

<body>

  <section id="title">

    <div class="container-fluid">

    <!-- Nav Bar -->
    <nav class="navbar navbar-expand-lg navbar-dark">
      <a class="navbar-brand" href="">Source</a>
      <button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbarTogglerDemo01" aria-expanded="false" >
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbar">
      <ul class="navbar-nav ms-auto">
          <li class="nav-item">
              <a class="nav-link" href="#footer">
                Contact</a>
          </li>
          <li class="nav-item">
              <a class="nav-link" href="#pricing">Pricing</a>
          </li>
          <li class="nav-item">
              <a class="nav-link" href="#cta">Download</a>
          </li>
      </ul>
   </div>
  </nav>



    <!-- Title -->

    <div class="row">
      <div class="col-lg-6">
        <h1 class="big-heading">Meet other talented musicians near you! </h1>
        <button type="button" class="btn btn-dark btn-lg downlaod-button"><i class="fa-brands fa-apple"></i> Download</button>
        <button type="button" class="btn btn-outline-light btn-lg downlaod-button"><i class="fa-brands fa-google-play"></i> Download</button>

      </div>
      
    
    <div class="col-lg-6" id="first-img">
      <img class="iphone" src="images/music3.png" alt="iphone-mockup">
    </div>
  </div>

  </div>
  </section>




  <!-- Features -->

<section id="features">
  <div class="row">
    <div class="feature-box col-lg-4">
    <h3><i class="icon fa-solid fa-square-check fa-3x"></i> Easy to use</h3>
    <p>With similar functionality to other social apps, you are already familiar with the type of interface we have.</p>
    </div>
    <div class="feature-box col-lg-4">
    <h3><i class="icon fa-solid fa-comment-dots fa-3x"></i> Network</h3>
    <p>The #1 Network for musicians. You're guaranteed to find someone to make that perfect project come to life.</p>
    </div>
    <div class="feature-box col-lg-4">
    <h3>
 
 
      <i class="icon fa-solid fa-square-plus fa-3x"></i> Create</h3>
    <p>Chat with your new friend, and start creating today!</p>
    </div>
  </div>
</section>


  <!-- Testimonials -->

  <section id="testimonials">
    <div id="testimonial-carousel" class="carousel slide" data-ride="carousel">
      <div class="carousel-inner">
        <div class="carousel-item active">
          <h2>I honestly didn't even know such an app existed until I came across Source. It has been such a game-changer for my music production, and whether you are looking to find vocals for a track or another artist to collaborate with, the ability to find friends and make connections through music digitally and from my own home is awesome.</h2>
    <img class="testimonial-image" src="images/dog-img.jpg" alt="dog-profile">
    <em>Pebbles, New York</em>
         
        </div>
        <div class="carousel-item">
          <h2 class="testimonial-text">My dog used to be so lonely, but with TinDog's help, they've found the love of their life. I think.</h2>
    <img class="testimonial-image" src="images/lady-img.jpg" alt="lady-profile">
    <em>Beverly, Illinois</em>
         
        </div>
        
      </div>
      <a class="carousel-control-prev" href="#testimonial-carousel" role="button" data-slide="prev">
        <span class="carousel-control-prev-icon"></span>
      </a>
      <a class="carousel-control-next" href="#testimonial-carousel" role="button" data-slide="next">
        <span class="carousel-control-next-icon"></span>
        
      </a>
    </div>

    

   

  </section>


  <!-- Press -->

  <section id="press">
    <img class="press-logo" src="images/techcrunch.png" alt="tc-logo">
    <img class="press-logo" src="images/tnw.png" alt="tnw-logo">
    <img class="press-logo" src="images/bizinsider.png" alt="biz-insider-logo">
    <img class="press-logo" src="images/mashable.png" alt="mashable-logo">

  </section>


  <!-- Pricing -->

  <section id="pricing">

    <h2>A Plan for Every Artist's Needs</h2>
    <p>Simple and affordable price plans for you.</p>

    <div class="row">
      <div class="pricing-column col-lg-4 col-md-6" >
    <div class="card">
      <div class="card-header">
        <h3>Basic</h3>
      </div>
       <div class="card-body">
        <h2>Free</h2>
        <p>100 Swipes Per Day</p>
        <p>10 Messages Per Day</p>
        <p>Unlimited App Usage</p>
        <button type="button" class="btn btn-lg btn-block btn-outline-dark">Sign Up</button>
      </div>
  </div>
</div>
<div class="pricing-column col-lg-4 col-md-6">
  <div class="card">
    <div class="card-header">
      <h3>Professional</h3>
    </div>
     <div class="card-body">
      <h2>$2 / mo</h2>
      <p>500 Swipes Per Day</p>
      <p>Unlimited Messages</p>
      <p>Unlimited App Usage</p>
      <button type="button" class="btn btn-lg btn-block btn-dark">Sign Up</button>
    </div>
</div>
</div>
<div class="pricing-column col-lg-4">

<div class="card">
  <div class="card-header">
    <h3>Unlimited</h3>
  </div>
   <div class="card-body">
    <h2>$5 / mo</h2>
    <p>Pirority Listing</p>
    <p>Unlimited Swipes</p>
    <p>Unlimited Messages</p>
    <p>Unlimited App Usage</p>
    <p>Advertisement Free</p>
    <button type="button" class="btn btn-lg btn-block btn-dark">Sign Up</button>
  </div>
</div>
</div>
</div>


   
    


    
    


   
    

  </section>


  <!-- Call to Action -->

  <section id="cta">

    <h3 class="cta-heading">Discover What Your Music Is In Need Of Today.</h3>
    <button type="button" id="bottom" class="btn btn-dark btn-lg downlaod-button"><i class="fa-brands fa-apple"></i> Download</button>
    <button type="button" id="bottom" class="btn btn-outline-light btn-lg downlaod-button"><i class="fa-brands fa-google-play"></i> Download</button>

  </section>


  <!-- Footer -->

  <footer id="footer">
    <i class="social-icon fa-brands fa-twitter"></i>
    <i class="social-icon fa-brands fa-facebook-f"></i>
    <i class="social-icon fa-brands fa-instagram"></i>
    <i class="social-icon fa-solid fa-envelope"></i>

    <p class="footer">© Copyright Source</p>

  </footer>


</body>

</html>

CSS

body{
    font-family: 'Montserrat';
    text-align: center;
}

.iphone{
    width: 60%;
    height: auto;
    position: relative;
    border-radius: 0 0 3% 3%;
    transform: rotate(25deg);
    margin-left: 20%;
    margin-top: 10%;
    z-index: 0;
}

#title{
    background-color: #ff4c68;
    text-align: left;
}
h1{
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;  
    line-height: 1.5;  
    font-weight: 900;
    color: white;
    
}
h2{
    font-family: "Montserrat";
    font-size: 3rem;
    line-height: 1.5;
    font-weight: 900;
}
.container-fluid{
    padding: 3% 15%;
}
/* Headings */
.big-heading{
    font-family: "Montserrat";
    font-size: 3rem;
    line-height: 1.5;
    font-weight: 900;
}



/* Navigation Bar */
.navbar{
    padding-bottom: 4.5rem;
}

.navbar-brand{
    font-family: "Ubuntu";
    font-size: 2.5rem;
    font-weight: bold;
    
}
.navbar-nav{
    float: right!important;

}
.nav-item{
    padding: 0 18px;
}

.nav-link{
    font-size: 1.2rem;
    font-family: 'Montserrat-light';
}
/* 
Download Buttons */

.downlaod-button{
    margin: 5% 3% 5% 0%;
}


h3{
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat';
    font-size: 1.5rem;
    font-weight: 900;
}
p{
    color: #8f8f8f;
}

/* Features */

#features{
    padding: 7% 15%;
    background-color: white;
    position: relative;
    z-index: 1;

}

.feature-box{
   
    padding: 5%;
}

.icon{
    color: #ef8172;
    margin-bottom: 1rem;
}

.icon:hover{
    color: #ff4c68;
}


/* Testimonial */

#testimonials{
    
    background-color: #ef8172;
    color: #fff;
}

.testimonial-image{
    transform: rotate(0deg);
    width: 10%;
    border-radius: 100%;
    margin: 20px;
}

.carousel-item{
    padding: 7% 15%;
}

#press{
    background-color: #ef8172;
    padding-bottom: 3%;

}

.press-logo{
    width: 15%;
    margin: 20px 20px 50px;
}

 .card-deck{
    
    
}

.card{
    margin: 20px;
    
    
    
}  

#pricing{
    padding: 100px;
    
}

.pricing-column{
    padding: 3% 2%;
}

.btn-block{
    width: 95%;
}

#cta{
    background-color: #ff4c68;
    color: #fff;
    padding: 7% 15%;
    
}
.cta-heading{
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;  
    line-height: 1.5;  
    font-weight: 900;
    color: white;
}
button#bottom{
   
}
.social-icon{
   margin: 20px 10px;
    
}
/* Footer */

#footer{
    padding: 7% 15%;
    
}


@media (max-width: 1028px){
.iphone{
    position: static;
    transform: rotate(0deg);
}

#title{
    text-align: center;
}

}
1 Answers

You are using Bootstrap 4 version in your Carousel code and in head you are importing Bootstrap 5 version. change your cdn to Bootstrap 4

In v5 carousel controls is presented as buttons, in v4 as links .

Related