My CSS is as follows:
#Container {
position: relative;
height: 400px;
width: 400px;
}
#TitleImage {
position: absolute;
left: 0;
top: 0;
}
#TitleText {
z-index: 100;
position: absolute;
color: white;
font-size: 24px;
font-weight: bold;
left: 150px;
top: 350px;
}
<div ID="Container">
<img src="https://picsum.photos/400" ID="TitleImage">
<div ID="TitleText">This is my title</div>
</div>
Can anyone see what's wrong? I've tried following tutorials to stack my text over my image but every single time the text just goes underneath the image. How do I fix this?