cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <input type="checkbox" class="main-nav-check" id="main-nav-check" />
<nav class="main-nav" id="main-nav">
  <a href="#">This</a>
  <a href="#">Little</a>
  <a href="#">Piggy</a>
  <a href="#">Went</a>
  <a href="#">To</a>
  <a href="#">Market</a>
</nav>

<div class="page-wrap">

  <header class="main-header">
    <label for="main-nav-check" class="toggle-menu">
      ☰
    </label>
    
    <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>
            
          
!
            
              @import "compass/css3";

* {
  box-sizing: border-box;
}

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

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

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

.main-nav-check {
  display: none;
}

.main-nav {
  position: fixed;
  top: 0;
  width: 0;
  height: 100%;
  background: #3B3B3B;
  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;
    color: white;
    padding: 15px;
    &: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));
  }
}

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

.close-menu {
  display: none;
}

#main-nav-check:checked + #main-nav {
  width: 20%;
}
#main-nav-check:checked ~ .page-wrap {
  width: 80%;
  .open-menu {
     display: none; 
  }
  .close-menu {
     display: block;
  }
  .main-header {
    width: 80%;
    left: 20%;
  }
}
            
          
!
            
              /*

CSS version of 
http://jpanelmenu.com/

Modified to use a checkbox and :checked selector instead of the :target selector

*/
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console