Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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

              
                <body>
<div class="container">
  
  <div class="sidebar">
    <img class="avatar" src="http://images.buddytv.com/articles/Image/michaelbluth.jpg" alt="Michael Bluth's avatar">
    <nav class="primary-navigation">
      <ul>
        <li><a href="">Plot</a></li>
        <li><a href="">Characters</a></li>
        <li><a href="">Trivia</a></li>
        <li><a href="">Comments</a></li>
      </ul>
      <i class="navigation-prompt">Show Menu</i>
    </nav>
  </div> 
  
  <div class="content">
    <h1 class="content-title">Words of Bluth Ipsum</h1>
    <p>I'm not a prostitute. Then I shall let you live! I'm sure, wherever your father is, she loves you very much. I know, I just call her Annabelle cause she's shaped like a&hellip;she's the belle of the ball! It's one banana Michael, what could it cost, ten dollars? If mother sees this, she will blow a cow. </p>
    <blockquote><p>George Michael may be suffering from what we in the soft-sciences call Obsessive Compulsive Disorder, or the "OC Disorder." </p></blockquote>
<p>I'll sacrifice anything for my children. I'm not a prostitute. <em>Michael:</em> Then I shall let you live! Maybe it was the other George Michael. You know, the singer-songwriter. </p>
<p>No, Pop-pop does not get a treat. I just bought you a f**king pizza. In the mid '90s, Tobias formed a folk music band with Lindsay and Maebe which he called Dr. Funke's 100 Percent Natural Good Time Family Band Solution. The group was underwritten by the Natural Food Life Company, a division of Chem-Grow, an Allen Crayne acqusition, which was part of the Squimm Group. Their motto was simple: We keep you alive. Michael was having brunch with Sally Sitwell at a restaurant called Skip Church's Bistro. In addition to brunch, the restaurant was known for an item on the menu called the "Skip's Scramble", an omelet that contained everything on the menu. Do not order the Skip's Scramble. &#9834;&#9834; And the thought of rubbin' you is getting so exciting. Sky rockets in flight! Afternoon delight! &#9834;&#9834; I'll sacrifice anything for my children. A group of British builders operating outside the O.C. The only thing I found in the fridge was a dead dove in a bag. <em>Gob:</em> You didn't eat that, did you? I'm not a prostitute. Then I shall let you live! </p>

<p>Friend of mine from college. He also has a boat tho not called the Seaward. I know what an erection feels like, Michael. The Man Inside Me seems well reviewed. Probably out there without a flipper, swimming around in a circle, freaking out his whole family. </p>
  </div>

</div>  
</body>
              
            
!

CSS

              
                
@import url(https://fonts.googleapis.com/css?family=Josefin+Sans|Vollkorn:400italic,400);

body {
  background: #F4FBF7;
  font-family: vollkorn, georgia, serif;
  color: #444;
  line-height: 1.4em;
}
p, h1, h2, h3, h4, h5, h6, blockquote {
  line-height: 1.4em;
}
.container {
  width: 90%;
  margin: 2em 5%;
  position: relative;
  background: white;
  border: 1px solid #E0F5EF;
  box-shadow: 0 2px 5px rgba(194,235,234, 0.3);
} 
.sidebar .avatar {
  width: 160px;
  border-radius: 5px;
  display: none;
}
.primary-navigation {
  padding: 20px;
}
.primary-navigation ul {
  list-style: none;
  padding-left: 0;
  margin-top: -20px;
  display: none;
}
.primary-navigation a {
  font-weight: bold;
  color: #FCA17E;
  text-decoration: none;
  line-height: 2.5em;
  display: block;
  text-align: center;
  border-bottom: 1px dotted transparent;
}    
.primary-navigation .navigation-prompt {
  font-style: normal;
  font-family: sans-serif;
  text-transform: uppercase;
  padding: .2em 0;
  margin: 0 auto;
  text-align: center;
  display: block;
  color: white;
  line-height: 2em;
  background: #FCA17E;
  width: 170px;
}
.primary-navigation .navigation-prompt:after {
  content: '';
  height: 0;
  border-width: 6px;
  border-color: transparent;
  border-top-color: white;
  border-style: solid;
  position: relative;
  top: 10px;
  left: 5px;
}
.primary-navigation .navigation-prompt.open:after {
  border-top-color: transparent;
  border-bottom-color: white;
  top: -14px;
}
.content {
  padding: 0 1.5em 20px;
}
.content-title {
  text-align: center;
  font-family: 'josefin sans', sans-serif;
  font-weight: 200;
  text-transform: uppercase;
}
blockquote {
  color: #FCA17E;
  font-style: italic;
  font-size: 1.2em;
  border-left: .5em solid #FCA17E;
  margin: 1em 0;
  padding-left: 1.5em;
}

/* MEDIA QUERIES */
@media only screen 
and (min-width : 45em) {
  body {
    font-size: 1.1em;
  }
  .sidebar {
    padding: 20px;
    width: 160px; /* total = 200px = 160px width + 40px padding */
    position: absolute;
    top: 0;
    left: 0;
  }
  .primary-navigation ul {
    display: block !important; /* overrides javascript from small screen sizes */
    padding-top: 1.5em;
  }
  .primary-navigation a {
    text-align: left;
    display: inline;
  }
  .primary-navigation a:hover {
    border-color: #FCA17E;
  }
  .primary-navigation .navigation-prompt {
    display: none;
  }
  .sidebar .avatar {
    display: block;
  }
  .content {
    padding: 0 1.5em 20px 230px;
  }
}
@media only screen 
and (min-width : 60em) {
  body {
    font-size: 1.4em;
  }
  .content {
    padding-left: 250px;
  }
}
              
            
!

JS

              
                $('.navigation-prompt').click ( function (){
  $('.primary-navigation ul').slideToggle();
  if ( $('.navigation-prompt').hasClass('open') ) {
    var txt = 'Show Menu';
  } else {
    var txt = 'Hide Menu';
  };
  $(this).toggleClass('open').text(txt);
});
              
            
!
999px

Console