I want to do something like this image,
but I do not know how to ensure that between each column there is a separation of 20px
between each column. I am doing margin-right: 20px;
but I will have a problem with the last column.
What is the best practice to solve this using flexbox
?
.flex_container{
display:flex;
border:1px solid red;
width:100%;
}
.flex_container div{
width:100%;
border:1px solid blue;
margin-right: 20px;
background:yellow;
height:400px;
}
<div class="flex_container">
<div>col 1</div>
<div>col 2</div>
<div>col 3</div>
<div>col 4</div>
</div>