Solution 1 :

that white-space transition are an animation of the class “slide” on Bootstrap 4.
In your main carousel div you are using that class.
<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel">
Just remove it and try it

Problem :

I’m having difficulty describing my problem so here’s a video that should make it quite obvious: https://gph.is/g/4LXNKkg

Essentially I’m using a bootstrap carousel template to display a basic full-width slider. But unlike other sliders, I have created before (not with bootstrap) and regardless of the changes, I make to the code it just won’t get rid of these ugly white-space transitions. Is there something obvious I’m missing here?

HTML: `

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="stylesheet" href="style.css" />
<header>
  <div class="header-upper container-fluid d-flex flex-row justify-content-center">
    <div class="logo m-3">
      <img src="images/v.png" />
    </div>
    <div class="header-upper-text m-2">
      <h1>This is the Title</h1>
      <h3>This is the description</h3>
    </div>
  </div>
  <div class="headder-middle">
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
      <div class="container-fluid">
        <a class="navbar-brand" href="#">Navbar</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <ul class="navbar-nav me-auto mb-2 mb-lg-0">
            <li class="nav-item">
              <a class="nav-link active" aria-current="page" href="#">Home</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#">Link</a>
            </li>
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> Dropdown </a>
              <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
                <li><a class="dropdown-item" href="#">Action</a></li>
                <li><a class="dropdown-item" href="#">Another action</a></li>
                <li><hr class="dropdown-divider" /></li>
                <li><a class="dropdown-item" href="#">Something else here</a></li>
              </ul>
            </li>
            <li class="nav-item">
              <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
            </li>
          </ul>
          <form class="d-flex">
            <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" />
            <button class="btn btn-outline-success" type="submit">Search</button>
          </form>
        </div>
      </div>
    </nav>
  </div>
</header>

<section class="header-slider">
  <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel">
    <ol class="carousel-indicators">
      <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active"></li>
      <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1"></li>
      <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2"></li>
    </ol>
    <div class="carousel-inner">
      <div class="carousel-item active">
        <img src="images/leaf-2210973_1920.jpg" class="d-block w-100" alt="..." />
        <div class="carousel-caption d-none d-md-block">
          <h5>First slide label</h5>
          <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
        </div>
      </div>
      <div class="carousel-item">
        <img src="images/wave-3473335_1920.jpg" class="d-block w-100" alt="..." />
        <div class="carousel-caption d-none d-md-block">
          <h5>Second slide label</h5>
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        </div>
      </div>
      <div class="carousel-item">
        <img src="images/wood-1350175_1920.jpg" class="d-block w-100" alt="..." />
        <div class="carousel-caption d-none d-md-block">
          <h5>Third slide label</h5>
          <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
        </div>
      </div>
    </div>
    <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-bs-slide="prev">
      <span class="carousel-control-prev-icon" aria-hidden="true"></span>
      <span class="visually-hidden">Previous</span>
    </a>
    <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-bs-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="visually-hidden">Next</span>
    </a>
  </div>
</section>

<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous"></script>

<script>
  var myCarousel = document.querySelector("#carouselExampleCaptions")
  var carousel = new bootstrap.Carousel(myCarousel, {
    interval: 5000
  })
</script>

`

CSS:

    .selector-for-some-widget {
  box-sizing: content-box;
}

a {
  text-decoration: none !important;
  color: #fff !important;
}

.logo img {
  max-width: 100px;
  max-height: 100px;
}

.header-upper {
  background-color: lightblue;
}

.header-middle {
  background-color: black;
}

.recent-posts {
  background-color: rgba(0, 0, 0, 0.247);
  position: relative;
  text-align: center;
  color: white;
}

.recent-posts-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.recent-posts-text p {
  border-bottom: 1px solid #fff;
}

.recent-posts-info a {
  color: #fff;
}

.recent-posts img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.carousel-inner {
  height: 32rem;
}

.carousel-item {
  float: none !important;
  margin-right: 0 !important;
}

@media (min-width: 576px) {
  .header-upper {
    background-color: blue;
  }
}

@media (min-width: 768px) {
  .header-upper {
    background-color: green;
  }
}

@media (min-width: 992px) {
  .header-upper {
    background-color: orange;
  }
}

@media (min-width: 1200px) {
  .header-upper {
    background-color: yellow;
  }
}

@media (min-width: 1400px) {
  .header-upper {
    background-color: red;
  }
}

By