Below this text is a screenshot of the layout i have written in flexbox.
Is it possible to achive a layout such that the red rectangle would be below the black rectangel with the use of flexbox?
This is the code i wrote to create this layout:
#container{
display: flex;
flex-flow: row wrap;
height: 409px;
width: 800px;
}
#firstof3 {
flex: 0 0 30%; /* Let it fill the entire space horizontally */
height: 100px;
background-color: yellow;
}
#secondof3 {
flex: 0 0 60%; /* Let it fill the entire space horizontally */
height: 100px;
background-color: blue;
}
#thirdof3 {
flex: 0 0 10%; /* Let it fill the entire space horizontally */
height: 100px;
background-color: green;
}
#image {
flex: 0 0 30%; /* ~ 2 * 33.33% */
height: calc(100% - 100px); /* excluding the height of the header */
background-color: lightgray;
}
#firstrowof3 {
flex: 0 0 66%; /* ~ 2 * 33.33% */
height: 100px; /* excluding the height of the header */
background-color: black;
}
#secondrowof3 {
flex: 0 0 66%; /* ~ 2 * 33.33% */
height: 200px; /* excluding the height of the header */
background-color: red;
}
<div id="container">
<div id="firstof3"></div>
<div id="secondof3"></div>
<div id="thirdof3"></div>
<div id="image"></div>
<div id="firstrowof3"></div>
<div id="secondrowof3"></div>
</div>
