title: Bootstrap 5 Cards need to be all same height using SwiperJS Slider
body: <p>I am not a CSS expert. I want all of the cards in a swiperjs slider to have the same height, no matter what the content is in the card. At the moment, the content of some of the cards is a different height. My code looks like this image and my sample code is below. How do I make my cards in swiperjs all have the same height?</p>
  <p><a href="https://i.stack.imgur.com/najSX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/najSX.png" alt="Image of the problem" /></a></p>
  <p>Here is the sample code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;title&gt;Test&lt;/title&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1" /&gt;
      &lt;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"
      /&gt;
      &lt;link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css"
      /&gt;
      &lt;style&gt;
          a {
              text-decoration: none;
          }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;section id="portfolio" class="mt-5"&gt;
          &lt;div class="container"&gt;
              &lt;div class="row justify-content-center"&gt;
                  &lt;div class="col-sm-12 text-center mb-4"&gt;
                      &lt;h2&gt;Projects I have completed for my clients&lt;/h2&gt;
                  &lt;/div&gt;
  
                  &lt;div class="col-sm-12 justify-content-center"&gt;
                      &lt;div class="swiper myClients animate__animated animate__pulse"&gt;
                          &lt;div class="swiper-wrapper"&gt;
                              &lt;div class="swiper-slide"&gt;
                                  &lt;div class="card mb-5"&gt;
                                      &lt;a data-fslightbox href="https://stefan-momcilovic.com/assets/images/tuff.jpg"&gt;
                                          &lt;img src="https://stefan-momcilovic.com/assets/images/tuff.jpg" class="card-img-top" alt="Tuffwraps Image" class="swiper-lazy"&gt;
                                      &lt;/a&gt;
                                      &lt;div class="card-body text-center"&gt;
                                          &lt;h5 class="card-title"&gt;&lt;a href="https://uk.tuffwraps.com/" class="text-primary" target="_blank" rel="nofollow"&gt;Tuffwraps&lt;/a&gt;&lt;/h5&gt;
                                          &lt;p class="card-text"&gt;
                                              Built a script that:&lt;br /&gt;
                                              1) Scans the products for tags in your Shopify cart &lt;br /&gt;
                                              2) If 3 products contain a same tag, the customer will be awarded 20% off &lt;br /&gt;
                                              3) Similarly, 4 will get them 25% off, and 5 or more will get them 30% off.
                                          &lt;/p&gt;
                                          &lt;a href="https://uk.tuffwraps.com/" class="text-primary" target="_blank" rel="nofollow"&gt;Shopify Plus&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div class="swiper-slide"&gt;
                                  &lt;div class="card mb-5"&gt;
                                      &lt;a data-fslightbox href="https://stefan-momcilovic.com/assets/images/travelbass.jpg"&gt;
                                          &lt;img src="https://stefan-momcilovic.com/assets/images/travelbass.jpg" class="card-img-top" alt="Travelbass Image" class="swiper-lazy"&gt;
                                      &lt;/a&gt;
                                      &lt;div class="card-body text-center"&gt;
                                          &lt;h5 class="card-title"&gt;&lt;a href="https://travelbass.myshopify.com/" class="text-primary" target="_blank" rel="nofollow"&gt;Travelbass&lt;/a&gt;&lt;/h5&gt;
                                          &lt;p class="card-text"&gt;
                                              Added a cart slider, made it so the page doesn't refresh in case a new item is added into a cart, while updating information about the quantity and price of products.
                                          &lt;/p&gt;
                                          &lt;a href="https://travelbass.myshopify.com/" class="text-primary" target="_blank" rel="nofollow"&gt;Shopify&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div class="swiper-slide"&gt;
                                  &lt;div class="card mb-5"&gt;
                                      &lt;a data-fslightbox href="https://stefan-momcilovic.com/assets/images/cea.jpg"&gt;
                                          &lt;img src="https://stefan-momcilovic.com/assets/images/cea.jpg" class="card-img-top" alt="CEA Image" class="swiper-lazy"&gt;
                                      &lt;/a&gt;
                                      &lt;div class="card-body text-center"&gt;
                                          &lt;h5 class="card-title"&gt;&lt;a href="https://www.shop-cea.com/" class="text-primary" target="_blank" rel="nofollow"&gt;CEA&lt;/a&gt;&lt;/h5&gt;
                                          &lt;p class="card-text"&gt;
                                              Tailored the responsive view for mobile devices.
                                          &lt;/p&gt;
                                          &lt;a href="https://www.shop-cea.com/" class="text-primary" target="_blank" rel="nofollow"&gt;Shopify&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div class="swiper-slide"&gt;
                                  &lt;div class="card mb-5"&gt;
                                      &lt;a data-fslightbox href="https://stefan-momcilovic.com/assets/images/tcl.jpg"&gt;
                                          &lt;img src="https://stefan-momcilovic.com/assets/images/tcl.jpg" class="card-img-top" alt="TCL Image" class="swiper-lazy"&gt;
                                      &lt;/a&gt;
                                      &lt;div class="card-body text-center"&gt;
                                          &lt;h5 class="card-title"&gt;&lt;a href="https://www.the-clothinglounge.com/" class="text-primary" target="_blank" rel="nofollow"&gt;THE CLOATHING LOUNGE&lt;/a&gt;&lt;/h5&gt;
                                          &lt;p class="card-text"&gt;Built a new design look&lt;/p&gt;
                                          &lt;a href="https://www.the-clothinglounge.com/" class="text-primary" target="_blank" rel="nofollow"&gt;Shopify&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div class="swiper-slide"&gt;
                                  &lt;div class="card mb-5"&gt;
                                      &lt;a data-fslightbox href="https://stefan-momcilovic.com/assets/images/cl.jpg"&gt;
                                          &lt;img src="https://stefan-momcilovic.com/assets/images/cl.jpg" class="card-img-top" alt="CL Image" class="swiper-lazy"&gt;
                                      &lt;/a&gt;
                                      &lt;div class="card-body text-center"&gt;
                                          &lt;h5 class="card-title"&gt;&lt;a href="https://creativelighters.com/products/the-mystery-subscription" class="text-primary" target="_blank" rel="nofollow"&gt;Creative Lighters&lt;/a&gt;&lt;/h5&gt;
                                          &lt;p class="card-text"&gt;Fixed a broken monthly subscription for a mystery box product&lt;/p&gt;
                                          &lt;a href="https://creativelighters.com/products/the-mystery-subscription" class="text-primary" target="_blank" rel="nofollow"&gt;Shopify&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="swiper-pagination"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/section&gt;
  
      &lt;script
        src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
        crossorigin="anonymous"
      &gt;&lt;/script&gt;
      &lt;script
        src="https://code.jquery.com/jquery-3.6.0.min.js"
        integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
        crossorigin="anonymous"
      &gt;&lt;/script&gt;
      &lt;script src="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          $(document).ready(function(){
              var myClients = new Swiper(".myClients", {
                  slidesPerView: 2,
                  spaceBetween: 30,
                  autoHeight: true,
                  autoplay: {
                      delay: 5000,
                  },
                  loop: true,
                  pagination: {
                      el: ".swiper-pagination",
                      clickable: true,
                  },
                  scrollbar: {
                      el: '.swiper-scrollbar',
                      draggable: true,
                  },
                  breakpoints: {
                      "@0.00": {
                      slidesPerView: 1,
                      spaceBetween: 10,
                      },
                      "@1.00": {
                          slidesPerView: 2,
                          spaceBetween: 30,
                      },
                  }
              });
          });
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>