I'm working with a small layout that consists of sections
.custom-collection {
display: flex;
flex-direction: column;
flex-wrap: wrap;
}
.custom-collection section {
width: 50%;
}
<div class="custom-collection">
<section>
<h2>bar</h2>
</section>
<section>
<h3>baz</h3>
</section>
<section>
<h1>FOO</h1>
</section>
</div>
In this design, everything is arranged in one column. The desired outcome should look like:
___________
| h2 | |
|____| h1 |
|_h3_|____|
I understand that the layout would wrap if I set max-width
, but determining the size of the div
in advance is challenging. My goal is to achieve wrapping in a way that ensures both columns have equal height.
How can I accomplish this?