1) I try to roll navbar on flexbox, on float it would be easier to do what I want, but I try to do everything on flexbox. So, the question is: is it possible to somehow move a single element to the right corner of its container? But to do it on flexbox and at the same time do not wrap it in any way. Here I need to move the item element to the right, to the end. And yes, why there are black indents over "HOME", it should be to its full height.
2) I thought to move it to margin-left, but it would be right to do it, or if it was done, and set a specific number of pixels, then different monitors will look different? And what units is better to use? I read that "px" is better not necessary.
.header, .topnav { width: 100%; background-color: black; display: flex; align-items: center; } .topnav a:hover { background-color: #ddd; color: black; } .topnav a { font-size: 20px; color: white; padding: 10px; } #active { background-color: green; } .icon { display: none; } <header class="header"> <div class="topnav"> <a href="#" class="hrefs" id="active">Home</a> <a href="#" class="hrefs">News</a> <a href="#" class="hrefs">Contacts</a> <a href="#" class="hrefs">About</a> <b><a href="javascript:void(0);" class="icon" onclick="openCity()">☰</a></b> </div> </header>