I am just starting to learn HTML and CSS.
In my first div, I want to display different elements, and in the second div, I would like to have text displayed over a background image. However, currently the text is appearing on top of the image. I want the text to be displayed first and then have the background image below it. How can I achieve this?
Below is the code I am using:
.navbar {
width: 100%;
}
.nav-left {
float: right;
width: 25%;
position: absolute;
padding-top: 14px;
}
.feature {
border: 2px solid black;
padding: 25px;
background: url(https://static3.depositphotos.com/1005590/206/i/950/depositphotos_2068887-stock-photo-lightbulb.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.navbar-Logo {
float: right;
color: #dd845a;
text-decoration: none;
}
<div class="navbar">
<div class="nav-left">
<a class="navbar-Logo" href="#">LOGO</a>
</div>
</div>
<div class="feature">
<h1> Sample Text</h1>
<p>Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text.</p>
<p><a href="#">Engage Now</a></p>
</div>