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…
(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?
I found a solution
– 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
– To recenter the overflow texte simply add bottom margin to the container.