Link the text width to another element

Hello :wave:

I’ve made a grid of two images height wrapped into a flex with their text inside. I would like to keep the text width the same as the image, but I can’t find the solution… :cry:
(each image has a different ratio, so their with are never the same)

My read-only link

Have you got any idea how to achieve this? :face_with_raised_eyebrow:
Thank you :white_heart:

I found a solution :smiley:
– Place the image and the txt inside a “container”.
– Set the container to position relative and define the height to the desired image dimension.
– Set the image heigth to 100%
– Set the txt position to absolut
– Done!
– To recenter the overflow texte simply add bottom margin to the container.