-1
I’m starting to use CSS flex, and I realized that when we centralize a container, it looks like the elements inside the container seem to be centralized, but if I align it to the right, the container loses centralization:
Left aligned (I have the problem with a large space on the right):
Aligning to the center, I have a problem with the centralized elements:
CSS:
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.item {
max-width: 136px;
flex: 1 0 136px;
margin: 0 5px 20px;
}
This is the example above. And that’s not quite it that I want.
Using float, I could still make one screen alignment.
Mine but his answer was the way he DOES NOT want, with the last item in the center...
– Caetano Sincero
Yeah, so that’s the problem...
– Ivan Ferrer
@Ruansenadev, I put that your answer is right, that’s exactly how I did and it worked, but I ended up arriving at the solution alone, anyway, thanks!
– Ivan Ferrer