https://i.sstatic.net/0Y760.png
I am looking to center the content of a grid, similar to the example shown above. The Boxes in this grid are dynamic, meaning there can be multiple Box elements in each row and multiple rows overall. The Nav section is always present.
My goal is to have both the Boxes and Nav centered within the grid.
https://i.sstatic.net/tTW72.png
In the image provided above, the issue arises when the screen size decreases. I need the Boxes to wrap onto new lines as shown in the example, but maintaining proper spacing between the Boxes and the Nav proves challenging without being able to set a fixed width due to the dynamic nature of the Boxes.
For reference, here is a link to the corresponding CodeSandbox.
Update
https://i.sstatic.net/AGI1B.png The desired end result should resemble the image linked here.
The sidebar will always remain on the right side, but the number of boxes on the left may vary per row, as well as the total number of rows with boxes.