Currently, I am developing components in React and experimenting with styling using index.css (although I understand this is not the recommended approach). Below is the current structure: https://i.sstatic.net/8euhM.png
I am looking to display a specific number of productContainer components (let's say 3) out of a total of 24. Currently, all items are appearing on the same line and I have attempted using flex-wrap without success. Adjusting the width also results in everything being grouped on the same line.
Although inline block or grid could resolve this issue, I prefer finding a solution via flexbox layout techniques.
CSS:
.productlist {
display: flex;
}
.productContainer {
padding: 10px;
width: 340px;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-items: flex-start;
border-style: ridge;
border-color: black;
border-width: 1px;
}
.item {
width: 100px;
word-wrap: break-word;
}