Hello, I have a question regarding div alignment. I have a situation where I have multiple divs within one another. I want the internal divs to be aligned to the center, but when there is a line break, the div that went to the second line goes to the position on the left, just below the first div on the first line.
But to do this I also can not use predefined width and height, since I want the div to be self-tuned.
Here is an example of the situation I currently have:
.fora {
background-color: black;
width: auto;
height: auto;
padding: 30px;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
align-content: flex-start;
margin: 0 auto;
}
.quadrado {
width: 90px;
height: 90px;
background-color: gray;
float: left;
margin: 10px;
align-self: flex-start;
}
<div class="fora">
<div class="quadrado"></div>
<div class="quadrado"></div>
<div class="quadrado"></div>
<div class="quadrado"></div>
<div class="quadrado"></div>
<div class="quadrado"></div>
</div>
The space on the right border is larger than on the left border, so I would like the border spacing to remain the same.
Thanks for the help.