Based on my small knowledge in bootstrap I think you should add p-5 as an example to your container div . P-(number between 1 & 5) representing the padding so in this way the boxes will have the space you want to stay away from the border.
I want to make a screen with buttons responsively, these buttons are square, they should be next to each other, but as soon as the line breaks they should start on the left side, but always stay in the center. I’m using bootstrap-5, but I don’t know how to do that. I tried with flex-box.
Do you want the buttons to be fixed width at 60px or scalable?
Comment posted by Daniela Gross
Is fixed in 60 px, but if have somehow to do the buttons scalable but with the same size, i will do
Comment posted by getbootstrap.com/2.0.2/scaffolding.html#fluidGridSystem
It looks like you are not using Bootstraps grid feature?
Comment posted by Daniela Gross
but my cards are still not in the middle of the div with the blue border 🙁
Comment posted by Remco Kersten
Can you explain in more detail? I really don’t understand what you want.
Comment posted by Daniela Gross
If you analyze the image you have in my question, where the one with the title says “I want” you can see that it has the black squares being rendered from beginning to end, while the div that holds them stays in the center. Already in the image that “I have” you can see that the black boxes are not in fact in the center.
Comment posted by Remco Kersten
That’s because the parent div had a set width. I have now removed these and applied a padding instead to create space. Is this what you mean?