It's hard to explain what I want so i drew a picture.
So basically the first div (the outer div) has fixed height. The third div - blue - contains some text that I don't know the height of so the div should wrap around the text which means it has variable height. And the second div - green - (that should fill the rest of the height) contains an image which should either shrink to fit the div or simply align to the bottom if it's smaller. The problem I encounter is that the image simply doesn't want to shrink. It will always try to be full size and will push the text out of the div #1.
I tried solving it with a table approach but somehow table ignores the outer div fixed height. I'm fine with a flexbox solution althought I would like to avoid it to also support older browsers.
I would really like to solve this with css cause javascript will only complicate things and make it more laggy.
.outer{
width: 100%;
height: 200px;
background-color: lightgray;
padding: 20px;
}
<div class="outer">
<div class="top">
<img src="http://themeflush.com/minimalix/demo4/wp-content/uploads/2014/08/wallpapers-for-christian-background-tumblr-photography-vintage-images-tumblr-wallpapers.jpg">
</div>
<div class="bottom">
<span>Title of the description<span>
<p>This is a long description.</p>
</div>
</div>