I have three div's:
- Div 01
- Div 02 - fixed width 300px
- Div 03
Div 01 and Div 03 should be same width.
Example:
- If viewport is 1000px, Div 01 width=350px and Div 03 width=350px,
- If viewport is 800px, Div 01 width=250px and Div 03 width=250px.
.flex-container {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.flex-item {
background: red;
flex: 1 auto;
height: 400px;
}
.middle {
background: blue;
width: 300px;
}
<div class="flex-container">
<div class="flex-item">This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.</div>
<div class="middle">sd</div>
<div class="flex-item">sd</div>
</div>
This is work as I want. But I need to add overflow: scroll to flex-item class.
After adding this, it does not work. How to solve it?