CodePen

HTML

            
                <nav class="main-nav" id="main-nav">
  <a href="#">Nav 1</a>
  <a href="#">Nav 2</a>
  <a href="#">Nav 3</a>
  <a href="#">Nav 4</a>
  <a href="#">Nav 5</a>
  <a href="#">Nav 6</a>
</nav>

<div class="page-wrap">

  <header class="main-header">
    <a href="#main-nav" class="open-menu">
      ☰
    </a>
    <a href="#" class="close-menu">
      ☰
    </a>
    
    <h1>cssPanelMenu</h1>
  </header>
  

  
  <div class="content">

    <p>It’s all about playing four quarters. I think we played well but the other team played well too. They took advantage of certain circumstances that arose. It’s a physical game.</p>
        
    <p>We tried to capitalize on some mistakes they made. In the third quarter they ran some plays. They are very good at throwing the football. They have a good quarterback who is a real leader. There are no statistics for that.</p>
        
    <p>We just need to show up, take things day by day, and prepare for the future. We’re looking at next week. We’re very optimistic. We’ll need to tighten up our game, make less mistakes, and stay focused.</p>
        
    <p>There are 22 players out there. We’re 11 of them. This is a game played on grass. It’s full of intangibles. There are ups and downs. If we look at today’s champions, they are proven winners. They play football.</p>
        
    <p>The groundwork has been laid so, now let’s look the future, make some good decisions, and take things to the next level.</p>
    
    <p>It’s all about playing four quarters. I think we played well but the other team played well too. They took advantage of certain circumstances that arose. It’s a physical game.</p>
        
    <p>We tried to capitalize on some mistakes they made. In the third quarter they ran some plays. They are very good at throwing the football. They have a good quarterback who is a real leader. There are no statistics for that.</p>
        
    <p>We just need to show up, take things day by day, and prepare for the future. We’re looking at next week. We’re very optimistic. We’ll need to tighten up our game, make less mistakes, and stay focused.</p>
        
    <p>There are 22 players out there. We’re 11 of them. This is a game played on grass. It’s full of intangibles. There are ups and downs. If we look at today’s champions, they are proven winners. They play football.</p>
        
    <p>The groundwork has been laid so, now let’s look the future, make some good decisions, and take things to the next level.</p>
        
  </div>
  
</div>
            
          
!

CSS

            
              * {
  box-sizing: border-box;
}

html, body { min-height: 100%; }
a { text-decoration: none; }

.main-header {
  background: linear-gradient(#3F94BF, #246485);
  padding: 5px;
  text-align: left;
  padding-left: 20px;
  color: white;
  text-shadow: #222 0px -1px 1px;
  position: static;
  width: 100%;
  left: 0;
  transition: all 0.3s ease;
  a {
    position: absolute;
    left: 20px;
    top: 20px;
    color: white;
    font-size: 32px;
  }
}

.page-wrap {
  float: right;
  width: 100%;
  transition: width 0.3s ease;
}

.content {
  padding: 20px 20px 20px 20px;
}

.main-nav {
   position: static;
   background: #3B3B3B;
   a {
    display: inline-block;
    color: white;
    padding: 15px;
    background: linear-gradient(#3E3E3E, #383838);
    &:hover, &:focus { color: #3F94BF; }
  }
}

.close-menu {
  display: none;
}

.open-menu {
  display: none;
}


@media (max-width:768px) {
.open-menu {
    display: block;
 }
  
 .main-header {
    position: fixed; 
    text-align: center;
 }
 
  .content {
    padding-top: 100px;
  }
  
  
.main-nav {
  position: fixed;
  top: 0;
  width: 0;
  height: 100%;
  overflow: hidden;
  transition: width 0.3s ease;
  a {
    display: block;
    background: linear-gradient(#3E3E3E, #383838);
    border-top: 1px solid #484848;
    border-bottom: 1px solid #2E2E2E;
    &:hover, &:focus {
      background: linear-gradient(#484848, #383838);
    }
  }
  &:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 34px;
    background: linear-gradient(left, rgba(black, 0), rgba(black, 0.4));
  }
}

#main-nav:target {
  width: 20%;
}
#main-nav:target + .page-wrap {
  width: 80%;
  .open-menu {
     display: none; 
  }
  .close-menu {
     display: block;
  }
  .main-header {
    width: 80%;
    left: 20%;
  }
}

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

JS

            
              /*

CSS version of 
http://jpanelmenu.com/

*/
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................