3
I can’t get the text "Text I want to overlay." to be on top of the div "textDiv" that is with an image as background, please help me please.
HTML
<div class="divLeft">
<img id="photo" src="photo.png">
<div class="textDiv">
<h2><i id="spaceText" class="fas fa-search"></i>Texto que quero sobrepor.</h2>
</div>
</div>
CSS
.divLeft {
width: 49.5%;
height: 949px;
float: left;
}
#spaceText {
padding-right: 16px;
}
#photo {
width: 1600px;
height: 949px;
}
Div has no image as background.
– Sam
try to use a z-index in the text you want to overwrite
– Chris
"stay on top of the div "textDiv""... the text is inside the div... as well as be on top?
– Sam
I want the text to be above the image
– Gabriel Sousa