Hugely frustrated that I've had to admit defeat on this one, just when I thought I had flexbox grokked! Apologies for the strange description but the issue is easier shown that described.
What I need: All four labelled divs (title, left, right, under-left) must all reside within a common container. Left and Right cols take up half the space each, but UNDER-LEFT must tuck under LEFT regardless of the height of RIGHT.
What I've got: At present as I increase the height of RIGHT it is pushing UNDER-LEFT down with it :(
My Code So Far
<style>
#container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 580px;
background-color: rgb(240, 240, 240);
}
#heading {
display: inline-block;
height: 100px;
width: 100%;
background-color: rgb(200, 200, 200);
}
#left {
background-color: red;
height: 250px;
flex: 0 0 50%;
}
#right {
background-color: lightblue;
flex: 0 0 50%;
}
#under-left {
background-color: lightgreen;
flex: 0 0 50%;
}
</style>
<body>
<div id="container">
<div id="heading">
<p>title</p>
</div>
<div id="left">
<p>LEFT height 250, basis 50%</p>
</div>
<div id="right">
<p>RIGHT, basis 50%</p>
</div>
<div id="under-left">
<p>UNDER-LEFT</p>
</div>
</div>
</body>
What I've tried: To be honest I'm at a total loss. I have tried floating elements but of course flex ignores floats. I don't know what else to try, it's not laziness as it took me about 25 minutes to create this post. I have searched for other answers on SO (such as CSS Flex Box Layout: full-width row and columns) but none feature the wrap-under element issue.
Please be kind!