How to specify an element after which to wrap in css flexbox? [duplicate]
You can accomplish this by setting this on the container: ul { display: flex; flex-wrap: wrap; } And on the child you set this: li:nth-child(2n) { flex-basis: 100%; } ul { display: flex; flex-wrap: wrap; list-style: none; } li:nth-child(4n) { flex-basis: 100%; } <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> This causes the child to make … Read more