Hey everyone, I've run into a bit of an issue with my project. I'm trying to create a system where text appears over an image, but the problem is that my div is set to absolute position and I can't switch it to relative without causing major complications due to some previous adjustments I made.
#box_1 {
position: absolute;
}
#box_1 img {
height: 100%;
width: 100%;
position: relative;
}
#box_1 h1 {
position: absolute;
}
<div id="box_1" class="test_div"><img src="img/scripting.jpg" /><h1>Documentation</h1></div>
Any ideas on how to solve this dilemma? It's crucial for me to ensure that the text remains on top of the image while keeping the DIV in position absolute.
UPDATE: Here's an example of what I'm aiming for: https://css-tricks.com/wp-content/csstricks-uploads/textoverimageexample.jpg