Home › Forums › CSS › Flexbox: mix between flex-start and space-around or space-between › Reply To: Flexbox: mix between flex-start and space-around or space-between
September 29, 2016 at 3:29 pm
#246020
Alex Zaworski
Participant
Given that the widths are all known in this circumstance you can do some goofy stuff with nth-of-type
, last-child
, and margin
:
.box:nth-of-type(5n+2):last-child {
margin-right: 195px;
}
.box:nth-of-type(5n+3):last-child {
margin-right: 130px;
}
.box:nth-of-type(5n+4):last-child {
margin-right: 65px;
}
But like Paulie said that seems pretty weird/bad… And also won’t work if the width is changing. Plus at that point you might as well use justify-content: flex-start
.