I am looking to retrieve data such as title, number, and date and display them in green boxes on my website. I want these boxes to be arranged in a single line, similar to the layout shown in this screenshot.
While ideally each line would contain 4 items, due to the dynamic nature of the number of boxes, I may only have two boxes per line.
It is important to me to maintain even spacing between the boxes, even when there are only 2 boxes present. Using { justify-content: space-between } does not work for me as it causes one box to stick to the right side of the page and the other to stick to the left. Additionally, using { margin-right } or { margin-left } is not suitable because when 4 boxes are present, I want them to align with the sides as they would with { justify-content: space-between }
Any assistance you can provide on this matter would be greatly appreciated.
PS: I primarily code in reactjs