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="container">
    <nav class="menu">
        <ul>
            <li><a href="#">Menu Item 1</a></li>
            <li><a href="#">Menu Item 2</a></li>
            <li><a href="#">Menu Item 3</a></li>
        </ul>
    </nav>
    <section class="content">
        <article>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar. The Big Oxmox advised her not to do so, because there were th</article>
        <article>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar. The Big Oxmox advised her not to do so, because there were th</article>
        <article>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar. The Big Oxmox advised her not to do so, because there were th</article>
    </section>
    <aside class="sidenote">side note</aside>
</div>
              
            
!

CSS

              
                .container {
  display: -webkit-flex;
  display: flex;
}

.menu {
  overflow: hidden;
  background-color: #D8E47F;
  -webkit-flex: 1;
          flex: 1;
  -webkit-transition: -webkit-flex 1s;
          transition: flex 1s;
}

.content {
  -webkit-flex: 3;
          flex: 3;
}

.sidenote {
  padding: 1em;
  background-color: #D8E47F;
  -webkit-flex: 2;
          flex: 2;
}

.menu > ul {
  margin: 1em;
  list-style-type: none;
  white-space: nowrap;
}

.menu a {
  color: black;
}

.content article {
  margin: 1em;
}

@media (max-width: 800px) {
  .sidenote {
    display: none;
  }
}

@media (max-width: 400px) {
    
  .menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .menu > ul {
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
  }

  .menu > ul > li {
    padding: 0 1em;
    -webkit-flex: 1;
            flex: 1;
  }

  .content {
    padding-top: 3em
  }
}

* {
  padding: 0;
  margin: 0;
}

              
            
!

JS

              
                
              
            
!
999px

Console