<!--
Forum question answer only:

https://www.sitepoint.com/community/t/reducing-the-size-of-my-icons-up-in-the-left-and-position-the-search-icon-on-the-left-of-sok-item/389010


-->
<div class="toolbar">
  <ul class="toolbar-inner">
    <li>
      <a class="small-logos" href="https://www.shl.se/">
        <img src="https://www.leksandsif.se/p/_nuxt/img/shl@2x.afa2ccc.png" max-height="20" max-width="20">
      </a>
    </li>
    <li>
      <a class="small-logos" href="https://www.svenskaspel.se/">
        <img src="https://www.leksandsif.se/p/_nuxt/img/svenskaspel@2x.4d6e366.png" max-height="20" max-width="20">
      </a>
    </li>
    <li>
      <a class="small-logos" href="https://www.norrlandsguld.se/">
        <img src="https://www.leksandsif.se/p/_nuxt/img/norrlands@2x.1897310.png" max-height="20" max-width="20">
      </a>
    </li>
    <li>
      <a class="small-logos" href="https://www.bauhaus.se/">
        <img src="https://www.leksandsif.se/p/_nuxt/img/bauhaus@2x.72a7c47.png" max-height="20" max-width="20">
      </a>
    </li>
    <li>
      <a class="small-logos" href="https://www.aftonbladet.se/">
        <img src="https://www.leksandsif.se/p/_nuxt/img/sportbladet@2x.40b62db.png" max-height="20" max-width="20">
      </a>
    </li>
    <li class="topbar-right toolbar-link"><a href="#">Link 1</a></li>
    <li class="toolbar-link"><a href="#">Link 2 here</a></li>
    <li class="toolbar-link"><a href="#">Link 3 goes here</a></li>
  </ul>
  <!-- end toolbar-inner -->
</div>
<!-- end toolbar -->

<header class="nav-wrap">
  <nav class="nav">
    <a class="logo" href="#"><img src="https://www.leksandsif.se/p/_nuxt/img/lif@2x.88adf7d.png"> </a>

    <button class="toggle navbar__toggle" id="mobile-menu"></button>
    <ul class="navbar__menu">
      <li class="navbar__item">
        <a href="#shop" class="navbar__links" id="shop-page">Shop</a>
      </li>
      <li class="navbar__item">
        <a href="#biljetter" class="navbar__links" id="biljetter-page">Biljetter</a>
      </li>
      <li class="navbar__item">
        <a href="#ett leksands if" class="navbar__links" id="ett leksands if-page">Ett Leksands If</a>
      </li>
      <li class="navbar__item">
        <a href="#mer" class="navbar__links" id="mer-page">Mer</a>
      </li>
      <li>
        <button class="cta">
          <i class="fa-solid fa-magnifying-glass"></i> Sök </button>
      </li>
    </ul>
  </nav>
</header>
<main>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>
  <p>Scroll :Just for testing sticky header</p>

</main>

<script src="https://kit.fontawesome.com/a364b4042f.js" crossorigin="anonymous"></script>
/*
Forum question answer only:

https://www.sitepoint.com/community/t/reducing-the-size-of-my-icons-up-in-the-left-and-position-the-search-icon-on-the-left-of-sok-item/389010
*/
html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  margin: 0;
}
:root {
  --max-width: 1380px;
}
.toolbar,
header {
  padding: 0 10px;
}
.toolbar {
  background: #000944;
}
.toolbar-inner {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: auto;
  padding: 0;
  list-style: none;
}
.toolbar-inner li {
  padding: 3px;
}
.small-logos {
  padding: 3px;
  display: block;
  margin-right: 0.5rem;
}
.small-logos img {
  width: auto;
  max-height: 22px;
}
.toolbar-link a {
  color: #fff;
  text-decoration: none;
  display: block;
  margin-left: 1rem;
}
.toolbar-link a:hover {
  text-decoration: underline;
}
.topbar-right {
  margin-left: auto;
}
/* note media queries will be required to rearrange this content when the screen is smaller than about 760px */

/* main navigation */
.nav-wrap {
  position: sticky;
  z-index: 99;
  top: 0;
  background: #20308d;
}
.nav {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: auto;
  padding: 5px 0;
}
.logo img {
  margin-bottom: -1.5rem;
  max-width: 90px;
  width: 100%;
  height: auto;
  margin-right: 2rem;
  position: relative;
  z-index: 99;
}
/* only reveal toggle when media query clicks in */
.navbar__toggle {
  display: none;
}
.navbar__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex: 1 0 0; /* make it stretch*/
  align-items: center;
  position: relative;
  top: 0;
  transition: all 0s;
}
.navbar__menu a {
  display: block;
  padding: 5px 10px;
  color: #fff;
  text-decoration: none;
  margin-right: 5vw;
}
.navbar__menu a:hover {
  text-decoration: underline;
}
.navbar__menu li:last-child {
  margin-left: auto;
}
button.cta {
  color: #fff;
  max-width: none;
  padding: 0;
  margin: 0 0 0 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
button.cta i {
  margin-right: 0.5rem;
}

/* some basic hamburger code */

.toggle {
  position: relative;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  width: 30px;
  height: 21px;
  border: none;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
  text-decoration: none;
  color: #fff;
  outline: 0;
}
.toggle:before,
.toggle:after {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  top: 6px;
  left: 0;
  background: #fff;
  position: absolute;
}
.toggle,
.toggle:before,
.toggle:after {
  transition: all 0.3s ease;
  transform: rotate(0deg);
}
.open.toggle {
  border-color: transparent;
}
.open.toggle:before {
  transform: rotate(45deg);
}
.open.toggle:after {
  transform: rotate(-45deg);
}

/* now show hamburger and re-arrange content in header*/

@media screen and (max-width: 760px) {
  .toolbar-link {
    display: none;
  }
  .navbar__menu {
    position: absolute;
    left: -200vw;
    opacity: 0;
  }
  .navbar__toggle {
    display: block;
  }
  .logo img {
    max-width: 60px;
    margin-right: 1rem;
  }
  .toggle {
    transform: scale(0.6);
  }
  .open + .navbar__menu {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background: black;
    padding: 2rem 0 1rem;
    opacity: 1;
    transition: top 0.5s ease, left 0s, opacity 0.5s ease;
    box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.5);
  }
}
const toggle = document.getElementById("mobile-menu");
toggle.onclick = function () {
  toggle.classList.toggle("open");
};
Run Pen

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.