<header>
  <a href="#logo" class="logo">Логотип сайта</a>
  <nav>
    <a class="active" href="#home">Главная</a>
    <a href="#contact">Контакты</a>
    <a href="#about">О нас</a>
  </nav>
</header>
* {box-sizing: border-box;}

body { 
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

header {
  overflow: hidden;
  background-color: #FFEB3B;
  padding: 20px 10px;
}

header a {
  float: left;
  color: #212121;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 18px; 
  line-height: 25px;
  border-radius: 4px;
}

header a.logo {
  font-size: 25px;
  font-weight: bold;
}

header a:hover {
  background-color: #FBC02D;
  color: #212121;
}

header a.active {
  background-color: #FBC02D;
  
}

nav {
  float: right;
}

@media screen and (max-width: 500px) {
  header a {
    float: none;
    display: block;
    text-align: left;
  }
  nav {
    float: none;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.