.container { width: 90%; margin: 0 auto; height: 100%; } .projects { margin-top: 120px; margin-left: auto; margin-right: auto; } .projects_con { text-align: center; } .buttons { margin-top: 40px; width: 80%; margin-left: auto; margin-right: auto; } .buttons ul { list-style: none; display: flex; justify-content: space-between; } ul .button2 { text-decoration: none; white-space: nowrap; padding: 10px 20px; border-radius: 3px; border: 1px solid #000; color: #8c8c8c; } <section class="projects"> <div class="container"> <div class="projects_con"> <div class="buttons"> <ul> <li><a href="#" class="button2">All</a></li> <li><a href="#" class="button2">Web Design</a></li> <li><a href="#" class="button2">Mobile App</a></li> <li><a href="#" class="button2">Illustration</a></li> <li><a href="#" class="button2">Photography</a></li> </ul> </div> </div> </div> </section> There are buttons superimposed flexbox. When the screen is reduced, the blocks stop at the same place and then stop positioning in the center (for some reason, the screenshot fails to load).
How to achieve such an effect so that the blocks do not cease to be positioned in the center and, accordingly, the first and last blocks climbs off the screen?
Now:
It should be:

