Consider the code snippet below:
<style>
.img_box {
display: flex;
}
</style>
<div class=img_box>
<img src=img/>
<div>Title text of varying length. It may exceed the image's width or be smaller.</div>
</div>
I am looking to be able to specify either a height or width value for the image and have the box adjust accordingly to match the image's width (excluding padding). The text should wrap and not impact the box's width, which should solely be determined by the image.
The box's height can change based on wrapped text, which is acceptable.