i have two div elements inside of parent div. These two elements are supposed to be next to each other. On the left is image, on the right is text.
 The image is loaded in dynamicly, so i cant tell what height it will be. I need the parent element to have total height of the image height, thats working. I am just using height set to auto. The problem comes with the text on the right. I want that to be fill the available height created by the image, but currently, if the text is too long it will extend the whole parent height over the image height. Creating empty gap under image. The text can be very long so i need the text to be cut off and use overflow set to scroll.

The problem is how do i make the text element on the right respect the height of the element on the left. I cant make it child of the elment on the left, because its an image. I dont know how to pass the height of the image to the text element on the right.
 Only solution i can think of is to put on the right side the image as well, hide it and put the text on top of it. But it seems very clumsy.

Thanks for any tips.

Edit: I am using React so i would prefer to evade Jquery if possible in any way.