Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                 <div class="page" id="nav-expand">
    <nav class="nav-side">
      <a href="#!" class="close">
        &times;
      </a>
      <a href="#nav-expand" id="nav-expand" class="btn-label">
        <span class="top"></span><span class="middle"></span><span class="bottom"></span><span class="label">MENU</span>
      </label>

      <ul class="menu-list">
        <li>
            <a href="#!" title="descriptive title">
              Link Label
            </a>
        </li>
        <li>
            <a href="#!" title="descriptive title">
              ಠ_ಠ Link Label
            </a>
        </li>
      </ul>
    </nav>

    <main class="main-base" role="main" id="nav-expand">

      <header class="header-base" role="banner">
        <div class="content">
          <h1>
            Display Sidebar/Settings on Click/Press of Icon
          </h1>
        </div>
      </header>

      <article>
        <div class="content">
          <p>
            Bacon ipsum dolor sit amet filet mignon prosciutto ham hock boudin pork chop swine shoulder beef. Flank andouille ground round strip steak pork bacon venison ham hock, tongue turducken. Venison jowl hamburger salami bacon capicola. Chuck ribeye sirloin spare ribs, venison beef t-bone prosciutto swine strip steak. Chuck jowl spare ribs tenderloin prosciutto. Pancetta pork chop venison bacon short ribs porchetta. Short loin short ribs kielbasa biltong t-bone tail brisket porchetta pork pork loin chicken.
          </p>
          <p>
            Pork belly meatball sirloin ribeye pork loin meatloaf. Tongue kielbasa chuck sausage, turducken jerky hamburger t-bone fatback frankfurter pork loin pig venison tail. Sirloin tri-tip kevin shankle salami doner jerky capicola leberkas tongue drumstick. Tongue turkey prosciutto salami tri-tip. Shank doner sirloin landjaeger pancetta beef ribs.
          </p>
          <p>
            Frankfurter pork loin short ribs andouille kevin. T-bone tail pig chuck prosciutto brisket. Landjaeger tail fatback beef porchetta, biltong shoulder turkey shankle kevin jowl pancetta brisket pork belly boudin. Short loin tenderloin swine, hamburger bresaola rump shank ground round ham kielbasa chicken pancetta capicola. Boudin chicken frankfurter, pig kielbasa flank ball tip. Corned beef pastrami landjaeger, meatloaf flank shankle pig meatball chuck pork loin swine.
          </p>
          <p>
            Pork belly meatball sirloin ribeye pork loin meatloaf. Tongue kielbasa chuck sausage, turducken jerky hamburger t-bone fatback frankfurter pork loin pig venison tail. Sirloin tri-tip kevin shankle salami doner jerky capicola leberkas tongue drumstick. Tongue turkey prosciutto salami tri-tip. Shank doner sirloin landjaeger pancetta beef ribs.
          </p>
          <p>
            Frankfurter pork loin short ribs andouille kevin. T-bone tail pig chuck prosciutto brisket. Landjaeger tail fatback beef porchetta, biltong shoulder turkey shankle kevin jowl pancetta brisket pork belly boudin. Short loin tenderloin swine, hamburger bresaola rump shank ground round ham kielbasa chicken pancetta capicola. Boudin chicken frankfurter, pig kielbasa flank ball tip. Corned beef pastrami landjaeger, meatloaf flank shankle pig meatball chuck pork loin swine.
          </p>
        </div>
      </article>

      <footer>
        <div class="content">
          <p>
            oh bai
          </p>
        </div>
      </footer>

      <a href="#!" class="overlay"></a>
    </main>

  </div>
              
            
!

CSS

              
                 *, *::after, *::before {
  box-sizing: border-box;
  font-family: arial;
  line-height: 2;
  margin: 0; }

body {
  background: #444;
  overflow-x: hidden; }

p {
  margin-bottom: 24px; }
  p:last-child {
    margin-bottom: 0; }

.content {
  margin: auto;
  max-width: 1000px;
  padding: 20px; }

.invis {
  height: 1px;
  left: -999px;
  position: absolute;
  top: -999px;
  visibility: hidden;
  width: 1px; }

nav a {
  color: #fff;
  text-decoration: none;
}

.main-base {
  background: #eee;
  left: 0px;
  position: relative;
  transition: all .3s; }

  .main-base header, .main-base footer {
    background: #888;
    color: #fff; }

footer a {
  color: #fff; }

.nav-side {
  background: #56cee8;
  color: #fff;
  top: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  height: 60px;
  left: 20px;
  overflow: hidden;
  padding: 8px 0;
  position: fixed;
  transition: all .3s;
  width: 60px;
  z-index: 2; }

.menu-list {
  height: 0%;
  list-style: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
  padding-top: 40px;
  transition: all .3s;

transition-delay: .2s;}
  .menu-list a {
    border-bottom: 1px solid #eee;
    color: #222;
    display: block;
    padding: 12px 8px;
    text-decoration: none;
  margin-left: -200px;
    white-space: nowrap;
    overflow: hidden;
  transition: margin-left .3s;}
    .menu-list a:hover {
      background: rgba(0, 0, 0, 0.5); }

.btn-label {
  cursor: pointer;
  display: block;
  height: 60px;
  width: 60px;
  position: absolute;
  top: 0;
  left: 0; }
  .btn-label .top {
    height: 3px;
    background-color: #fff;
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .btn-label .middle {
    height: 3px;
    background-color: #fff;
    position: absolute;
    top: 22px;
    left: 12px;
    right: 12px;
  }
  .btn-label .bottom {
    height: 3px;
    background-color: #fff;
    position: absolute;
    top: 32px;
    left: 12px;
    right: 12px;
  }
  .btn-label .label {
    text-align: center;
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    font-size: 12px;
  }
  #nav-expand:target .nav-side .btn-label {
    display: none;
  }
#nav-expand:target .menu-list a {
  margin-left: 0;
}

.close {
  cursor: pointer;
  text-align: right;
  padding-right: 15px;
  line-height: 30px;
  font-size: 30px;
  cursor: hand;
  cursor: pointer;
  display: none;
  height: 40px;
  border-bottom: 1px solid #fff;
position: absolute;
right: 0;
width: 100%;}
  #nav-expand:target .nav-side .close {
    display: block;
  }

#nav-expand:target .nav-side {
  bottom: 0;
  height: 100%;
  left: 0;
  width: 200px;}
  #nav-expand:target .menu-list {
    height: 100%; }
  #nav-expand:target .btn-label {
    color: transparent;
    display: inline-block;
    height: 20px;
    line-height: 20px;
    text-align: center;
    width: 20px; }
  #nav-expand:target .main-base {
    left: 200px; }
  .main-base {
    left: 0; }
  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,.5);
    opacity: 0;
    transition: opacity .3s; }
  #nav-expand:target .main-base {
    left: 200px; }
  #nav-expand:target .overlay {
    position: absolute;
    opacity: 1; }
              
            
!

JS

              
                
              
            
!
999px

Console