Is there a way to center one of the flex/grid children(more than three) and with different widths?
问题 Have a look at the snippet. There is a red line to show center of the parent. Is there a way to horizontally center middle block ? CSS-grid solution will also work. I can imagine 2 solutions: position: absolute wrap 2 left blocks and 2 right blocks with wrappers of same width But I'm not happy with any of them. .wrapper { display: flex; align-items: center; justify-content: space-between; height: 100px; padding: 5px; position: relative; background: teal; color: #fff; font-family: sans-serif;