Hey there! I could really use some assistance with a coding issue that has been causing me quite the headache. I've been working on creating a page for a local intermunicipal Football Association using Bootstrap, and I'm having trouble achieving something specific: overlaying the carousel on top of a background image, disregarding the blue and yellow elements.
However, what I have managed to achieve so far looks like this.
Here is the code snippet I am working with:
<!--Background image-->
<div class="bg">
<img src="img/football-field.jpg" class="img-responsive" alt="background">
</div>
<section id="main-content">
<div class="container">
<div class="col-md-2 col-sm-2 navigation">
content content
content content
content content
content content
content content
content content
</div>
<div class="col-md-10 col-md-10 gallery">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="img/example.jpg" alt="description">
</div>
<div class="item">
<img src="img/example.jpg" alt="description">
</div>
<div class="item">
<img src="img/example.jpg" alt="description">
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</section>
and here is my CSS:
.bg{
height: 420px;
z-index: -999;
}
#main-content{
z-index: 100;
background-color: white;
}
Your help would be greatly appreciated!
P.S. Please excuse any language barriers or inaccuracies in my explanation. English isn't my first language, so I hope you can still understand my issue clearly :)