I have a set of images as tiles with the following css properties: For the parent
.poster-container > div {
display: flex;
flex-direction:row;
flex-wrap: wrap;
}
and for the flexed items:
.poster-item {
flex: 1 0 10%;
margin: 30px;
height: auto;
text-align:center;
overflow: hidden;
position:relative;
cursor: pointer;
}
I have restricted it such that at most 6 tiles can appear in a row. However, when there are less than 6 tiles in the last row, the flexed items stretch out to take equal width each. How can i restrict the tiles from stretching across the whole width so that they are displayed as tiles in the other rows?