I'm facing a scenario where I have three elements: div with content 1, div with content 2, and an image that spans 100% width (with variable height). My goal is to align div 1 at the top, the image at the bottom, and fill the remaining space with content 2. All three elements should fit perfectly within the device view.
I've heard that using flexbox could help me achieve this layout, but I'm unsure about how to actually implement it.
It's important to note that I'm looking for a CSS-only solution.
Here's a link to the Plunker demonstration: Click here
<ion-view title="Welcome">
<ion-content has-header="true" style="display: flex; flex-flow: column;">
<div style="height: 100%">
<div style="background-color: red;">
Content 1 (height based on content)
</div>
<div style="background-color: blue; flex: 2;">
Content 2 (remaining height)
</div>
<div>
<img style="width: 100%;" src="http://dummyimage.com/600x400/000/fff" />
</div>
</div>
</ion-content>
</ion-view>