I'm sorry. Redid a little.
Here is an example https://codepen.io/gluhovalexey/pen/OBjzGY
There is a header and an element of 3 parts, which includes ul lists left and right and a middle div with content located in flex-contaner
The essence of the question if you remove the item with lists of ul, then the width of the header will decrease. Ie if from the page of the site in which there is ul as an example go to another, where there are no lists, then the header of the site and other permanent elements will "jump" because of the resizing.
<div class="flex-container"> <div class="flex-row header"> <img src="https://d.radikal.ru/d17/1810/b9/7bd548daa75f.png"> <img src="https://d.radikal.ru/d17/1810/b9/7bd548daa75f.png"> <img src="https://d.radikal.ru/d17/1810/b9/7bd548daa75f.png"> </div> <div class="flex-row content"> <div class="left"> <ul> <li class=""><a href="" target="_blank">Пункт a</a></li> <li class=""><a href="" target="_blank">Пункт b</a></li> <li class=""><a href="" target="_blank">Пункт c</a></li> <li class=""><a href="" target="_blank">Пункт d</a></li> <li class=""><a href="" target="_blank">Пункт e</a></li> <li class=""><a href="" target="_blank">Пункт f</a></li> <li class=""><a href="" target="_blank">Пункт j</a></li> <li class=""><a href="" target="_blank">Пункт h</a></li> </ul> </div> <div class="center"> Какой то контент посередине </div> <div class="right"> <ul> <li class=""><a href="" target="_blank">Пункт 1</a></li> <li class=""><a href="" target="_blank">Пункт 2</a></li> <li class=""><a href="" target="_blank">Пункт 3</a></li> <li class=""><a href="" target="_blank">Пункт 4</a></li> <li class=""><a href="" target="_blank">Пункт 5</a></li> <li class=""><a href="" target="_blank">Пункт 6</a></li> <li class=""><a href="" target="_blank">Пункт 7</a></li> <li class=""><a href="" target="_blank">Пункт 8</a></li> </ul> </div> </div> </div> Styles:
.header { justify-content: center; flex-direction: row; flex-wrap: wrap; } .header img { width: 32%; margin: 1px; height: 100%; } .flex-container { display: flex; margin: 10px auto; max-width: 1300px; flex-wrap: wrap; flex-direction: column; } .flex-row { display: flex; margin-bottom: 50px } .content { flex-direction: row; width: 100%; } .content .left { flex: 2; width: 20%; } .content .center { flex: 4; justify-content: center; width: 60%; } .content .right { flex: 2; width: 20%; }
justify-content: space-betweenparent of the parent isjustify-content: space-betweenRuslan Semenov