I have added position like relative and absolute to the elements in my css but it does not work properly.
This is my HTML Code for the title and features section of my website. I want to make the image of the dog appears behind the feature section. I have added the z-index for the feature section as 1 but it doesn't appear in front of the image.
<!-- Title -->
<div class="row">
<div class="col-lg-6">
<h1>Meet new and interesting dogs nearby.</h1>
<button type="button" class="btn btn-dark btn-lg download-button">
<i class="fab fa-apple"></i> Download
</button>
<button
type="button"
class="btn btn-outline-light btn-lg download-button"
>
<i class="fab fa-google-play"></i> Download
</button>
</div>
<div class="iphone-container col-lg-6">
<img class="iphone" src="images/iphone6.png" alt="iphone-mockup" />
</div>
</div>
</div>
</section>
<!-- Features -->
<section id="features">
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
<i class="far fa-check-circle fa-4x feature-img"></i>
<h3>Easy to use.</h3>
<p class="sub-text">So easy to use, even your dog could do it.</p>
</div>
<div class="col-lg-4">
<i class="fas fa-bullseye fa-4x feature-img"></i>
<h3>Elite Clientele</h3>
<p class="sub-text">We have all the dogs, the greatest dogs.</p>
</div>
<div class="col-lg-4">
<i class="fas fa-heart fa-4x feature-img"></i>
<h3>Guaranteed to work.</h3>
<p class="sub-text">
Find the love of your dog's life or your money back.
</p>
</div>
</div>
</div>
</section>
This is my CSS code
.iphone{
width: 60%;
transform: rotate(25deg);
position: absolute;
right: 30%;
}
.iphone-container {
position: relative;
}
/* Features */
#features {
padding: 10% 15%;
position: relative;
text-align: center;
z-index: 1;
}