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

              
                <body>
<div class="container">
  <div class="message-box">
    <div class="message">
      This is a message
    </div>
  </div>
  <div class="content">
  <p>
Bacon ipsum dolor amet leberkas biltong ground round, flank pork loin sirloin shankle. Fatback andouille rump, picanha cupim landjaeger short loin brisket turkey beef drumstick kielbasa pancetta hamburger jowl. Corned beef hamburger shank landjaeger pork belly pork chop fatback beef picanha swine doner. Pork belly cupim chuck shankle alcatra venison pig turkey picanha chislic fatback turducken corned beef.
  </p>
  
  <p>
Kielbasa sausage chislic, pancetta ribeye pork chop doner turkey chuck biltong swine. Venison pork belly alcatra, bacon ham buffalo meatloaf ham hock filet mignon chuck frankfurter doner. Venison ham burgdoggen t-bone turducken shoulder brisket kielbasa. Pancetta flank corned beef andouille. Pork loin drumstick burgdoggen shoulder meatball.
  </p>
  
  <p>
Bacon ipsum dolor amet leberkas biltong ground round, flank pork loin sirloin shankle. Fatback andouille rump, picanha cupim landjaeger short loin brisket turkey beef drumstick kielbasa pancetta hamburger jowl. Corned beef hamburger shank landjaeger pork belly pork chop fatback beef picanha swine doner. Pork belly cupim chuck shankle alcatra venison pig turkey picanha chislic fatback turducken corned beef.
  </p>
  
  <p>
Bacon ipsum dolor amet leberkas biltong ground round, flank pork loin sirloin shankle. Fatback andouille rump, picanha cupim landjaeger short loin brisket turkey beef drumstick kielbasa pancetta hamburger jowl. Corned beef hamburger shank landjaeger pork belly pork chop fatback beef picanha swine doner. Pork belly cupim chuck shankle alcatra venison pig turkey picanha chislic fatback turducken corned beef.
  </p>
    </div>
</div>
</body>
              
            
!

CSS

              
                .container {
  position: relative;
  display: flex;
	align-items: flex-end;
  height: 300px;
  width: 50%;
  border: 1px solid black;
  overflow-y: scroll;
  margin: auto;
}

.message-box {
  position: relative;
  z-index: 1;
  width: 100%;
}

.message {
  width: 100%;
  border: 1px solid black;
  background-color: #ccccff;
  text-align: center;
  padding: 1rem;
}

.content {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
}

body {
  min-height: 100%;
}
              
            
!

JS

              
                
              
            
!
999px

Console