acoustic85's avatar

Bootstrap Carousel horizontal gray bar on the bottom

Hi guys,

I am just trying to customize bootstrap carousel but for some reason i have horizontal gray bar on the bottom below every picture and I can't get rid of it. This is my code:

     <!----carousel-->
      <section class= "bg-dark rounded ">
      
      
          <div class="container mt-2 bg-warning ">
        <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
            <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner">
            <div class="carousel-item active">
              <img src="images/1.jpg" class="d-block w-100" alt="...">
              <div class="carousel-caption d-none d-md-block  title-bg">
                <h5>News 1</h5>
                <p>Title goes here...</p>
              </div>
            </div>
            <div class="carousel-item">
              <img src="images/2.jpg" class="d-block w-100" alt="...">
              <div class="carousel-caption d-none d-md-block title-bg">
                <h5>News 2 </h5>
                <p>Title goes here...</p>
              </div>
            </div>
            <div class="carousel-item">
              <img src="images/3.jpg" class="d-block w-100" alt="...">
              <div class="carousel-caption d-none d-md-block title-bg shadow-sm ">
                <h5>News 3</h5>
                <p>Title goes here....</p>
              </div>
            </div>
          </div>
          <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
          </a>
          <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
        </div>
      </div> 
      </section>





Any help will be appreciated. Thank you very much in advance

0 likes
7 replies
chaudigv's avatar
chaudigv
Best Answer
Level 16

Try adding container-fluid

<div class="carousel-inner container-fluid">
acoustic85's avatar

i remove the the background for the class .active and gray part gone but now i have a small line below every slide and i dont know from where this line is coming

chaudigv's avatar

@doncho85 Without seeing the image and the code, I can't say what the issue could be.

Atoagustyn's avatar

@doncho85 you can use your browsers dev tools to inspect and find the line of code the grey is showing and you fix this

acoustic85's avatar

the active class was causing the issue. I remove the background and also I put container-fluid and its all good now. Thanks

Please or to participate in this conversation.