Pen Settings



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


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


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.


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.


  <div id="w">
    <header id="heading"><h1>Sticky Sidebar Menu*</h1></header>
    <div id="content">
      <h2>A Big Large Heading</h2>
      <p>Pretend we are looking at a simple blog post.</p>
      <p>Content is generated courtesy of <a href="">Bluth Ipsum</a>.</p>
      <p>I believe you will find the dessert to be both engrossing and high-grossing! So we don't get dessert? You're a good guy, mon frere. That means brother in French. I don't know how I know that. I took four years of Spanish. Suddenly he's too much of a big-shot to brush mother's hair.</p>
      <p>Ah, it is a rock, though. Should beat everything. Yeah there's not a lot of logic to it. I know, I just call her Annabelle cause she's shaped like a... she's the belle of the ball!</p>
      <p>Buster's in what we like to call a light to no coma. In laymans terms, it might be considered a very heavy nap.</p>
      <p>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.</p>
      <p>Sweet old thing. Only two of those words describe Mom, so I know you're lying to me. Here he comes. Here comes John Wayne.</p>
      <p>Everything they do is so dramatic and flamboyant. It just makes me want to set myself on fire. The CIA should've just Googled for his hideout, evidently.</p>
      <p>She's always got to wedge herself in the middle of us so that she can control everything. Yeah. Mom's awesome. Maybe we should call her?</p>
      <div id="articlefoot">
        <p>^ the scrolling stops here. Maybe we can find some comments below...</p>
        <h2>User Comments</h2>
        <p>Dead Dove DO NOT EAT.</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
        <p>end of the article..</p>
    <div id="sidebar">
      <p>Follow on Twitter <a href="" target="_blank">@treehouse</a>!</p>
      <p><a href="" target="_blank"><img src="" alt="Twitter"></a></p>
    <footer id="foot"> <!-- no content --> </footer>


                @import url(',800,700');

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  outline: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
html { height: 101%; }
body { font-family: 'Open Sans', Tahoma, Arial, sans-serif; font-size: 62.5%; line-height: 1; background: #33363b; }

::selection { background: #adf0bd; }
::-moz-selection { background: #adf0bd; }
::-webkit-selection { background: #adf0bd; }

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
ol, ul { list-style: none; }

blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
strong { font-weight: bold; } 

table { border-collapse: collapse; border-spacing: 0; }
img { border: 0; max-width: 100%; }

h1 { 
  font-size: 4.5em; 
  color: #5d73b4;
  line-height: 1.35em; 
  font-weight: 800;
  margin-bottom: 20px; 
  letter-spacing: -0.03em; 
  text-align: right;
  text-transform: lowercase;
  text-shadow: 1px 1px 1px #9fafde;

h2 {
  font-size: 3.6em; 
  color: #4e4f52;
  line-height: 1.35em; 
  font-weight: 800;
  margin-bottom: 18px; 

h3 {
  font-size: 2.4em;
  color: #6c9357;
  line-height: 1.0em;
  font-weight: 800;
  margin-bottom: 15px;
  cursor: default;

p { font-size: 1.6em; line-height: 1.4em; color: #343434; margin-bottom: 15px; }

a { text-decoration: none; color: #557eb0; }
a:hover { text-decoration: underline; }

/* core body */
#w { 
  display: block;
  width: 800px;
  padding-top: 40px;
  margin: 0 auto;

#w header {
  margin-bottom: 35px;

#content {
  width: 650px;
  float: left;
  padding: 15px 20px;
  background: #efefef;
  border-right: 7px solid #639846;
  box-shadow: 4px 5px 10px rgba(30, 30, 30, 0.35);
  -webkit-border-top-left-radius: 8px;
  -moz-border-radius-topleft: 8px;
  border-top-left-radius: 8px;

#sidebar {
  width: 150px;
  background-color: #efefef;
  margin: 45px 0 30px 0;
  padding: 5px 10px;
  float: right;
  border-bottom: 3px solid #7fc558;
  opacity: 0.75;
  -webkit-transition: opacity 0.15s linear;
  -moz-transition: opacity 0.15s linear;
  transition: opacity 0.15s linear;
#sidebar:hover {
  opacity: 1.0;
#sidebar p { margin-bottom: 6px; }

#w footer {
  display: block;
  width: 100%;
  clear: both;
  padding: 20px 0 75px 0;


  $('#sidebar').stickyMojo({footerID: '#articlefoot', contentID: '#content'});