title: How to center items inside a col horizontally in Bootstrap 5
body: <p>I have created a Grid system with just 2 columns. The first one is text and in the second one I have included a carousel. I have set the image size to custom for the carousel image. No matter what I do I am unable to center the carousel image inside my col to the center horizontally.</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-css lang-css prettyprint-override"><code>.title-sec {
    color: #fff;
    padding-top: 100px;
    padding-bottom: 100px;
  }
  
  .carousel {
    width: 400px;
    height: auto;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"&gt;
  
  &lt;div class="container title-sec"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col text-center my-auto"&gt;
        &lt;h1 class="heading1"&gt; Sample Text&lt;/h1&gt;
        &lt;h2 class="heading2"&gt;Sample Breifing&lt;/h2&gt;
      &lt;/div&gt;
      
      &lt;div class="col m-auto"&gt;
        &lt;div id="carouselExampleFade" class="carousel slide carousel-fade" data-bs-ride="carousel"&gt;
          &lt;div class="carousel-inner"&gt;
            &lt;div class="carousel-item active"&gt;
              &lt;img src="https://via.placeholder.com/300" class="d-block w-100" alt="..."&gt;
            &lt;/div&gt;
            
            &lt;div class="carousel-item"&gt;
              &lt;img src="https://via.placeholder.com/300" class="d-block w-100" alt="..."&gt;
            &lt;/div&gt;
            
            &lt;div class="carousel-item"&gt;
              &lt;img src="https://via.placeholder.com/300" class="d-block w-100" alt="..."&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          
          &lt;button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="prev"&gt;
              &lt;span class="carousel-control-prev-icon" aria-hidden="true"&gt;&lt;/span&gt;
              &lt;span class="visually-hidden"&gt;Previous&lt;/span&gt;
           &lt;/button&gt;
  
           &lt;button class="carousel-control-next" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="next"&gt;
              &lt;span class="carousel-control-next-icon" aria-hidden="true"&gt;&lt;/span&gt;
              &lt;span class="visually-hidden"&gt;Next&lt;/span&gt;
          &lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>