I have a div, with an img and another div inside, I want the image to be behing the second div, how would I do that?
( i have multiple of these)
Don't know how to make this, tried multiple things...
#pointTerminal {
padding: 6px;
position: absolute;
left: 359px;
top: 607px;
transform: translate(-50%, -50%);
}
#pointParking {
padding: 6px;
position: absolute;
z-index: 15;
left: 356px;
top: 586px;
transform: translate(-50%, -50%);
}
#pointIcon {
top: 0%;
position: absolute;
max-width: 100%;
height: 100%;
color: red;
cursor: pointer;
transform: translate(-50%, -50%);
transition: .3s; /* Animation */
z-index: 2;
}
#cardpoint {
position: absolute;
flex-direction: column;
max-width: 200px;
min-height: 30px;
border-radius: 10px;
margin-bottom: 10px;
background-color: #2a2a2a;
opacity: 0;
transition: opacity 0.3s ease, height 0.3s ease;
pointer-events: none;
z-index: 66;
}
<div id="pointTerminal">
<img id="pointIcon" src="https://picsum.photos/500">
<div id="cardpoint" >
<p id="cardTitle">Terminal</p>
</div>
</div>
<div id="pointParking">
<img id="pointIcon" src="https://picsum.photos/400">
<div id="cardpoint" >
<p id="cardTitle">Legion Square</p>
</div>
</div>
I want the "cardpoint" div to be in front of "pointIcon" img, it need to be in that order in the html