Slider not fitting span of window css issue?

Viewed 32

Hi everyone nice to be here on stackoverflow, I'm just having a bit of trouble fitting the slider to the span of the window happens in every browser any ideas would be very greatful. Thank you in advance. I have added the CSS and HTML code below this comment. Hi everyone nice to be here on stackoverflow, I'm just having a bit of trouble fitting the slider to the span of the window happens in every browser any ideas would be very greatful. Thank you in advance. I have added the CSS and HTML code below this comment.

Snapshot of site im working on

/*-----Slider-----*/
#slider{
    width: 100%;
    margin: auto;
    font-family: Chakra Petch;
}
.carousel-caption{
    top: 50%;
    transform: translateY(-50%);
    bottom: initial !important;
}
.h1-0{
    color: black !important; 
    font-size: 40px;
    font-weight: bold;
    background: #fff !important;
    opacity: 0.8;
}
.h1-1{
    color: black !important;
    font-size: 40px;
    font-weight: bold;
    background: #fff !important; 
    opacity: 0.8;
}
.h1-2{
    color: black !important;
    font-size: 40px;
    font-weight: bold;
    background: #fff !important;
    opacity: 0.8;
}
.h1-3{
    color: black !important; 
    font-size: 40px;
    font-weight: bold;
    background: #fff !important;
    opacity: 0.8;
}
<!-- Slider -->
<div id="slider" data-aos="fade-up" data-aos-duration="2000" data-aos-delay="1300">
  <div id="headerSlider" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#headerSlider" data-slide-to="0" class="active"></li>
    <li data-target="#headerSlider" data-slide-to="1"></li>
    <li data-target="#headerSlider" data-slide-to="2"></li>
    <li data-target="#headerSlider" data-slide-to="3"></li>
    <li data-target="#headerSlider" data-slide-to="4"></li>
  </ol>
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="img/welcome-slider-image.jpg" class="d-block img-fluid" alt="Welcome Image">
    </div>
    
    <div class="carousel-item">
      <img src="img/webdesign-image.jpg" class="d-block img-fluid" alt="Website Design Image">
      <div class="carousel-caption">
        <h1 class="h1-0">Web Site Design</h1>
      </div>
    </div>
    
    <div class="carousel-item">
      <img src="img/seo-slider-image.jpeg" class="d-block img-fluid" alt="SEO Image">
      <div class="carousel-caption">
        <h1 class="h1-1">Search Engine Optimization<br></h1>
      </div>
    </div>

    <div class="carousel-item">
      <img src="img/software-development-slider-image.png" class="d-block img-fluid" alt="App Development Image">
      <div class="carousel-caption">
        <h1 class="h1-2">App & Software Development<br></h1>
      </div>
    </div>

    <div class="carousel-item">
      <img src="img/cyber-security.jpg" class="d-block img-fluid" alt="Software Development Image">
      <div class="carousel-caption">
        <h1 class="h1-3">Cyber Security<br></h1>
      </div>
    </div>
  </div>
  <a class="carousel-control-prev" href="#headerSlider" 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="#headerSlider" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>
</div>

0 Answers
Related