As you can see, the list-items in the first row have same height. But items in the second row have different height
list-items
row
height
You can with flexbox:
ul.list { padding: 0; list-style: none; display: flex; align-items: stretch; justify-items: center; flex-wrap: wrap; justify-content: center; } li { width: 100px; padding: .5rem; border-radius: 1rem; background: yellow; margin: 0 5px; }
title 1 title 2new line title 3newline