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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <div class="container">
  <div class="secondary-content">
    <div class="content-inner">
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lectus quis metus sagittis interdum vel vel mauris. Sed ex risus, gravida et magna at, porttitor vehicula turpis. Praesent convallis, purus interdum ultrices ultricies, turpis ligula tincidunt elit, suscipit condimentum arcu massa in lacus. In eget tempus mi. Aenean sed tellus vulputate, pulvinar turpis a, placerat lacus. Duis ut urna sed tortor auctor ornare. Aenean interdum velit aliquam tellus consequat, nec maximus velit lobortis. Vestibulum massa metus, facilisis ut lectus eget, cursus rhoncus massa.

Integer quam nisl, vehicula sed nibh id, finibus sagittis arcu. Maecenas semper faucibus urna egestas eleifend. Sed nec gravida felis. Praesent blandit erat eu enim consectetur, non mollis purus aliquet. Nunc eu nisi non ante volutpat mollis sed quis lorem. Cras a quam tellus. Vestibulum viverra rutrum risus at convallis. Donec non nisl quis augue laoreet euismod vel at diam. Ut eu arcu in ligula facilisis semper eget sit amet justo. Aenean vel bibendum enim. Duis pharetra leo nec quam viverra, a ullamcorper lorem eleifend. Sed quis lorem pulvinar, sollicitudin sem maximus, elementum metus. Mauris fringilla, urna eu tincidunt placerat, quam mauris luctus libero, nec congue massa arcu ac enim. Nullam eget nunc eu eros auctor imperdiet at ac ex.

Fusce ac magna eu sapien venenatis porttitor et nec mi. Sed eget nibh consectetur, fermentum tortor et, maximus ligula. Vestibulum luctus cursus porta. Morbi in erat eu libero congue consequat ac quis tellus. Sed vehicula efficitur ipsum ut ullamcorper. Mauris lobortis elementum porttitor. Praesent hendrerit purus at sodales cursus. Aenean tempus congue lectus, id pellentesque ante sollicitudin sed. Vestibulum id dapibus dui. Etiam leo sem, finibus suscipit congue eget, laoreet convallis nibh. Pellentesque nunc turpis, sagittis rhoncus tempor vitae, scelerisque porta quam. In tortor massa, ullamcorper nec nisl a, convallis interdum purus. Phasellus lacinia eros vitae ante lacinia, sit amet tristique purus feugiat. Sed interdum eros purus, ut lacinia ante sodales eget. Suspendisse porttitor molestie urna sed congue.

Aliquam faucibus nibh urna, eu ornare mauris posuere et. Sed tempor scelerisque erat. Suspendisse in fermentum purus, nec tempus lorem. Quisque varius pharetra egestas. Ut leo sapien, maximus non risus at, bibendum viverra odio. Aenean fringilla nec eros non dictum. Duis tincidunt massa malesuada nibh posuere, eget facilisis sem vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus erat risus, egestas id turpis a, consectetur condimentum arcu.

Quisque sit amet magna cursus dolor aliquet pellentesque. Mauris porttitor hendrerit ligula, non commodo massa condimentum quis. Praesent eget efficitur nisi, ac efficitur est. Sed consequat sapien eget neque dictum rutrum. Maecenas sit amet justo id libero ultrices volutpat. Cras non velit dolor. Etiam nunc sem, semper nec pharetra eu, convallis eget risus. Nam a arcu mollis, commodo ipsum quis, venenatis dui. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus luctus congue lorem tempor consectetur. Nunc mauris leo, efficitur a lorem nec, varius mattis nisi. Pellentesque ut lacus dui.
    </div>
  </div>
  <div class="main-content">
  </div>
</div>
              
            
!

CSS

              
                .container {
  position: relative;
}
.main-content {
  width: 80%;
  margin-left: 20%;
  height: 300px;
  background-color: red;
}
.secondary-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 20%;
  overflow-y: scroll;
}
              
            
!

JS

              
                
              
            
!
999px
Save your sass for CSS. Everywhere else be kind.

Console