CodePen

HTML

            
              <nav>
  <ul class="top-nav">
    <li><a href="#">Home</a></li>
    <li  class="active"><a href="#">About</a>
      <ul class="sub-nav">
        <li><a href="#">About - 1</a></li>
        <li><a href="#">About -  2</a></li>
        <li><a href="#">About -  3</a></li>
        <li><a href="#">About -  4</a></li>
      </ul>
    </li>
    <li><a href="#">Clients</a>
      <ul class="sub-nav">
        <li><a href="#">Client - 1</a></li>
        <li><a href="#">Client - 2</a></li>
        <li><a href="#">Client - 3</a></li>
      </ul>
    </li>
    <li><a href="#">Contact Us</a></li>
  </ul>
</nav>
<div class="content">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              * {
  box-sizing:border-box;
}

nav, .content {
  width:960px;
  margin: 10px auto;
}

nav {
  margin-top:20px;
  height:100px;
  background:orange;
}

.top-nav {
  text-align:center;
  font-size:0;
  position:relative;
}

.top-nav > li {
  display:inline-block;
  width:25%;
}

.top-nav > li:hover,
.sub-nav > li:hover {
  background:green;
}

.top-nav > li.active {
  background:red;
}

.top-nav > li:last-of-type {
  
}

.top-nav > li a {
  text-decoration:none;
  font-size:28px;
  line-height:50px;
  text-align:center;
  color:black;
  display:block;
}

li.active a, 
.top-nav > li > a:hover,
.sub-nav > li > a:hover {
  color:black;
}

.sub-nav {
  position:absolute;
  visibility:hidden;
  left:0;
  right:0;
}
/*
.top-nav li:hover ul {
  visibility:visible;
  text-align:left;
}
*/

li.active ul {
  visibility:visible;
  text-align:left;
  background-color: red;
}

.sub-nav > li {
  display:inline-block;
  padding:0 25px;
}

.sub-nav > li a {
  border:none;
}

.sub-nav > li a:hover {
  background:green;
}

.content {
  height:250px;
  background:lightgrey;
  padding:10px;
}

            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              // When the anchor is clicked, the class of 'active' is added removed from the current active list item and added to the list item containing the clicked anchor //

$(function() {
    $('li a').click(function(e) {
        e.preventDefault();
        var $this = $(this);
        $this.closest('ul').children('li').removeClass('active');
        $this.parent().addClass('active');
    });
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................