Why, if elements are given a table-cell and a width of 1%, do they divide the entire width of the parent among themselves? And why, when reducing the size of the window on the first element, there appears an incomprehensible padding, which shifts it down?
.nav { list-style: none; border: 1px solid #eaeaea; height: 60px; box-sizing: border-box; padding: 0; margin: 0; } .nav__item { display: table-cell; width: 1%; } .nav__item:not(:last-child) { border-right: 1px solid #eaeaea; } .nav__item-link { width: 100%; height: 60px; display: inline-flex; justify-content: center; align-items: center; padding: 0 20px; box-sizing: border-box; } <ul class="nav"> <li class="nav__item"><a href="#" class="nav__item-link">Link 1 222222</a></li> <li class="nav__item"><a href="#" class="nav__item-link">Link 2</a></li> <li class="nav__item"><a href="#" class="nav__item-link">Link 3</a></li> <li class="nav__item"><a href="#" class="nav__item-link">Link 4</a></li> <li class="nav__item"><a href="#" class="nav__item-link">Link 5</a></li> </ul>