I'm facing a challenge using Flexbox to achieve the desired result shown below
https://i.sstatic.net/8vJGQ.png
When trying to position my 2 blocks on the right, one of them ends up crossing the line and I struggle to bring it back up.
I want this layout to be managed dynamically in the future, which is why I am avoiding CSS Grid for now.
Could it be that I'm approaching this the wrong way?
.o-wrapper{
padding-right: 1.875rem;
padding-left: 1.875rem;
margin-right: auto;
margin-left: auto;
max-width: 75rem;
}
.page__project{
margin-bottom: 30px;
position: relative;
display: flex;
justify-content: center;
align-items: center;
background-color: red;
}
.page__projects-list{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.page__project-bloc{
padding: 50px;
text-align: center;
position: relative;
z-index: 10;
}
.page__project--small{
width: 31.0526315789%;
height: 177px;
}
.page__project--large{
width: 65%;
height: 177px;
}
.page__project--big{
width: 65%;
height: 370px;
}
<div class="o-wrapper page__projects-list">
<div class="page__project page__project--small">
<div class="page__project-bloc page__project-bloc--small">
<h3 role="heading" aria-level="3">VLW #48</h3>
<p>
Mise en page du magazine Vivre la Wallonie 48e édition.
</p>
</div>
</div>
<div class="page__project page__project--large">
<div class="page__project-bloc page__project-bloc--small">
<h3 role="heading" aria-level="3">Elit Ligula Etiam</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque
nisl consectetur et.
</p>
</div>
</div>
<div class="page__project page__project--big">
<div class="page__project-bloc page__project-bloc--big">
<h3 role="heading" aria-level="3">VLW #48</h3>
<p>
Mise en page du magazine Vivre la Wallonie 48e édition.
</p>
</div>
</div>
<div class="page__project page__project--small">
<div class="page__project-bloc page__project-bloc--small">
<h3 role="heading" aria-level="3">VLW #48</h3>
<p>
Mise en page du magazine Vivre la Wallonie 48e édition.
</p>
</div>
</div>
<div class="page__project page__project--small">
<div class="page__project-bloc page__project-bloc--small">
<h3 role="heading" aria-level="3">VLW #48</h3>
<p>
Mise en page du magazine Vivre la Wallonie 48e édition.
</p>
</div>
</div>
</div>