I have a simple grid here using css flex.
I need the 3 columns that are a percentage of the parent container width.
I also need a right margin on each block.
I nearly have it working here but I need the blocks in the second line to go from left to right, here the second block on the second row is on the right.
.block {
border: 1px solid lightgrey;
display: flex;
flex-wrap: wrap;
padding: 5px;
max-width: 900px;
justify-content: space-between;
//justify-content: flex-start;
}
.block__item {
//align-self: flex-start;
background: grey;
height: 20px;
//margin-right: 8px;
margin-bottom: 2px;
width: calc(33.3% - 2px);
}
<div class="block">
<div class="block__item"></div>
<div class="block__item"></div>
<div class="block__item"></div>
<div class="block__item"></div>
<div class="block__item"></div>
</div>