You could do it lots of ways – with flexbox, CSS tables, probably even by floating the img and using
But we can’t really offer much more than suggestions when all we’re faced with is an image.
Why don’t you have a go yourself first and try something out in a CodePen demo; show us your HTML markup and CSS, what you’re trying to actually achieve this effect, and explain the problems you’re having. From there we can offer suggestion based on your code. Unfortunately, we aren’t here to write your code for you.