For a wrap flex box, is it possible to modify the box behaviour once the box is stacked ? (In pure CSS).
Just taking this toy example,
p {
border: dashed 1px;
}
#container {
display: flex;
flex-wrap: wrap;
}
#item1 {
flex: 1 1 auto;
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-items: end;
align-content: end;
background: blue;
}
#item2 {
flex: 3 1 auto;
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-items: start;
align-content: start;
background: red;
}
<div id="container">
<div id="item1">
<p>This is the item 1.</p>
<p>item 1.</p>
</div>
<div id="item2">
<p>This is the item 2.</p>
<p>item 2.</p>
</div>
</div>
is it possible to center the p item, once the blue box is stacked (by resizing the window). I expected something like :
#item2: wrap {
align-items: center;
align-content: center;
}
Is it actually possible in pure CSS ?