I have a problem I can't solve which I want to reproduce a behaviour.
This behaviour consists in, per example:
Two divs(div1 and div2) in a flexbox row with flex-wrap, where the div2 shrinks(while you're changing window size) until it reaches a specific width, and only after that, I want it to drop down(or wrap it) from div1.
The only thing I can do to happen is:
- when I change window size from the right, it instantly drops below div1 and after that it starts to shrink.
<body>
<div id="container">
<div class="item" id="pri"></div>
<div class="item" id="seg"></div>
</div>
</body>
/* CSS */
#container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.item {
width: 300px;
height: 200px;
}
.item#pri {
background-color: red;
}
.item#seg {
background-color: green;
width: 600px;
flex-shrink: 3;
margin-right: 20px;
}