This feels like a really really simple problem, but I'm struggling here.
I have looked at a number of other questions (eg: Child divs next to each other with auto height, How do I keep two side-by-side divs the same height?), and haven't found a solution.
I have two divs, in a wrapping div, displayed side by side. The height of one is determined by text content of indeterminate length, and the height of the other (which just has a background image) should match.
My thinking was something like this:
.wrapper {
display: flex;
flex-direction: row;
border: 1px solid black;
}
.image {
background-image: url(https://source.unsplash.com/random/600x600);
height: 100%; /* Shows up w no height! */
width: 300px;
border: 1px solid yellow;
/* Needed to make the image show */
/* height: 200px; */
}
.content {
width: 100%;
padding: 20px; /* Height is sum of text height and padding */
border: 1px solid blue;
}
<div class="wrapper">
<div class="image">
</div>
<div class="content">
<p>This could go on and on and on, and should determine the height of the set of divs, sitting next to each other. I do NOT want to program a set height, because that could clip long text.</p>
</div>
</div>