I'm trying to get these elements with 25% width inside a flexbox and with overflow-x:scroll. There will be more then 4 elements so my aim is to get 25% per each of the first 4, the rest to be scrollable. My current setup doesn't return 25% per each element. Could you please help me.
Thanks.
#wrapper {
padding: 0 10px;
max-width: 1400px;
margin: 0 auto;
}
.cont25 {
width: 25%;
background: black;
height: 20vw;
margin: 10px;
max-height: 280px;
flex: none;
}
.flex {
display: flex;
}
#novinky .flex {
overflow-x: scroll;
}
<div id="wrapper">
<div class="outterBox" id="novinky">
<div class="flex">
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
<div class="cont25">
<p>25%</p>
</div>
</div>
</div>
</div>