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="padre"> 
  <div class="hijo">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nec ornare nisi. Curabitur sodales, justo vitae ullamcorper auctor, elit sem commodo orci, pretium tristique libero libero non ante. Nulla sagittis mauris vitae quam mollis ultrices. Aliquam luctus dictum enim et ornare. Etiam fermentum est vel libero auctor laoreet. Vestibulum non porttitor lorem. Curabitur ligula nisi, vehicula ac libero non, vulputate imperdiet mi. Cras ut ante quis nibh elementum porta nec nec mi.

Duis luctus vulputate neque, ut cursus libero ultricies ac. Fusce sed porttitor justo. Nam vel accumsan metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam egestas enim et ullamcorper rutrum. Vivamus scelerisque, erat vel consequat tempor, sem magna tempor enim, eu scelerisque eros justo auctor tortor. Cras elementum vel ante et rhoncus. Aliquam erat volutpat. Maecenas vel ligula sit amet dolor sodales malesuada ut sed tortor.

Phasellus sit amet elit sit amet odio molestie hendrerit. Duis interdum ex ac lacus tristique lacinia. Nulla nisi lacus, hendrerit sed lobortis non, tincidunt sit amet neque. Nunc vel risus mauris. Donec malesuada tortor quis hendrerit pharetra. Phasellus sodales placerat nisi id tempus. Curabitur nibh nisi, eleifend vitae rutrum id, rhoncus in velit. Duis rutrum imperdiet lacus, at lacinia odio rutrum quis. Vivamus pulvinar diam ipsum, sit amet condimentum odio iaculis varius. Quisque viverra suscipit erat. Ut et sapien orci. Fusce dictum scelerisque massa, ac pretium erat hendrerit non. Nunc nec feugiat diam. Donec eu nibh neque. Donec quis nisi eget elit tristique volutpat.
  </div>
</div>
              
            
!

CSS

              
                body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.padre {
  width: 100vw;
  height: 50vh;
  background-color: beige;
  overflow: scroll;
}

.hijo {
  width: 200px;
  margin: auto;
}
              
            
!

JS

              
                
              
            
!
999px

Console