If you take the code that you posted in your query and copy it into a file and open that file in your browser, will it duplicate the problem that you are seeing?
???
No, of course not. The images have no dimensions and we don’t know what is around them… what they are within… their environment.
The answer to your question is probably very simple, but I would like to see you present the problem in a manner that we can troubleshoot without guessing.
Just for fun, here’s a guess, from which, hopefully, you will be able to do whatever you wish:
The code that I posted is a working page (notice it starts with <!doctype> and ends with </html> and has everything needed in the middle). It is loosely based on your code and your description.
Copy that code to a new file with a name that ends in .htm or .html. Double-click it and open it in your browser. (That’s what working pages are for). Then answer the question, does this demonstrate what you need or not? If not, what do you need?
Well, hmmmmm. You can see from the screenshot that the text does indeed overlay the image. It’s positioned over the lower part of each image, but can be raised higher if desired.
You could post a screenshot showing how it appears to you. That might be a useful clue.
Thanks for the feedback. Perhaps someone else will give it a go.
I realize that the code that I posted is very different from the model that you posted. Yours seemed overly complicated so I took the liberty of posting a simpler example. If I need to make some “adjustments” so it works for you in your environment, just let me know and I’ll be glad to tweak; or if you simply want an explanation about how any of it works, just ask.
Hope you noticed that the images will resize so they are always 40% of the width of the browser window.
The reason why the CSS seems overly complicated, I’m still rather noob at CSS, considering that I am a lone developer, I would say it’s rather good, no disrespect to you Thanks again