Klaudia Wojcieska
Klaudia Wojcieska

Reputation: 1

Bootstrap Carousel's background not equal

I have a problem with Bootstrap Carousel with my two backgrounds.

#Carousel-purpose {
  background-color:#856c8b;
  text-align: center;
  color: #fff;
}

.carousel-inner {
  padding: 7% 15%;
}
<section id="Carousel-purpose">

  <div id="Carousel" class="carousel slide" data-ride="carousel">
    <ol class="carousel-indicators">
      <li data-target="#Carousel-purpose" data-slide-to="0" class="active"></li>
      <li data-target="#Carousel-purpose" data-slide-to="1"></li>
    </ol>
    <div class="carousel-inner">
      <div class="carousel-item active"  data-interval="3000">
       <h3>Szyjemy maski dla najbardziej potrzebujących oraz domów opieki.</h3>
       <img src="images/hospital.png" width="100px" height="100px">
      </div>
      <div class="carousel-item"  data-interval="3000">
       <h3>Wypełnij ankietę, by pomóc nam dostarczyć maski dla potrzebujących!</h3>
       <button type="button" class="btn btn-outline-light btn-lg ">Light</button>
      </div>
     
    </div>
    <a class="carousel-control-prev" href="#Carousel-purpose" 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="#Carousel-purpose" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
</section>

Why are they not equal? I've attached image below for better explanation. Probably the issue is in CSS but honestly I don't know where, could someone help?

enter image description here

Upvotes: 0

Views: 34

Answers (1)

Lakindu Kariyawasam
Lakindu Kariyawasam

Reputation: 119

instead of using,

<img src="images/hospital.png" width="100px" height="100px">

try,

<img src="images/hospital.png" style=" width:100px; height: 100px !important;">

use the same to the second background image.

Upvotes: 1

Related Questions