I want to make a menu using flexbox. For the menu in the header made justify-content: flex-end; I want to make a logo on the other side of the menu, but justify-content: flex-start; cannot be applied to a single element. Set the width for the menu and margin-right: auto; for the logo did not help. Used align-self , did not help either. What to do? Special thanks for the help in structuring the code. I'm just learning web development and my head is cooking poorly.
It should be like this:
When scaling it turns out like this:
* { box-sizing: border-box; } ul { margin: 0 auto; width: 80%; background: #7F1143; } .main, .nav { -webkit-justify-content: flex-end; display: -webkit-flex; } .nav a { display: block; padding: 20px; color: white; text-decoration: none; } .logo { margin-right: auto; } .menu { display: flex; width: 80%; -webkit-justify-content: flex-end; } a:not(.logo):not(.contacts) { border-right: 1px solid #979797; } .nav { -webkit-flex-direction: row; -webkit-flex-wrap: wrap; list-style-type: none; } <ul class="nav"> <li><a class="logo">Item 1</a> </li> <div class="menu"> <li><a href="#">Item 2</a> </li> <li><a href="#">Item 3</a> </li> <li><a href="#">Item 4</a> </li> </div> <li><a class="contacts" href="#">Contacts</a> </li> </ul> 
