I am trying to to center text over multiple images using bootstrap and css. Most googling says i need to use position: absolute; However the most i am able to do is center the text in the middle of the screen but not over the image. I believe its something with bootstrap but i cannot find what is blocking it The goal is for the text to have animation over the image moving forward like fading in and such
I have already checked multiple post about this but they all seem to only work if its one image. Trying to do with with multiple images seems to require a different approach
EDIT: Since this got marked as a duplicate i would like to point out that the other post only show this working with ONE image. The other post do not work when it comes to multiple images
The portion of the code in question:
.imgText {
position: absolute;
z-index: -1;
}
.imgList {
z-index: -2;
}
<div class="row justify-content-center mt-3">
<div class="ml-4 imgList">
<img src="https://via.placeholder.com/200x200">
<div class="imgText justify-content-center m-auto">
test text
</div>
</div>
<div class="ml-4 imgList">
<img src="https://via.placeholder.com/200x200">
<div class="imgText justify-content-center m-auto">
test text
</div>
</div>
</div>
You can see the live results here https://jsfiddle.net/nicholascox2/o29n78dL/61/