<header>
  <nav>
    <ul>
      <li class="nav-item"><a href="#">Home</a></li>
      <li class="nav-item"><a href="#">Portfolio</a></li>
      <li class="nav-item"><a href="#">Categories</a></li>
      <li class="nav-item"><a href="#">Your Profile</a></li>
      <li class="nav-item"><a href="#">Contact us</a></li>
    </ul>
  </nav>
</header>
body {
  font-family: 'Arial';
}

h2 {
  font-size: 2em;
  font-weight: bolder;
  margin-bottom: 0.5em;
}

p {
  font-size: 1em;
  line-height: 1.45;
  margin-bottom: 1em;
}

nav {
  background: whitesmoke;
}

ul:after {
  content: "";
  display: block;
  clear: both;
}

.nav-item {
  display: block;
  float: left;
  width: 50%;
  text-align: center;
}

.nav-item a {
  display: block;
  padding: 1em;
  color: #000;
  text-decoration: none;
  font-size: 1.5em;
}

.nav-item a:hover {
  background: darkgrey;
}

@media (min-height: 400px) {
  .nav-item {
    float: none;
    width: 100%;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.