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

              
                <div class="container">
  <div class="content">
    <div class="image-container">
      <img src="https://picsum.photos/seed/picsum/450/200" alt="">
    </div>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi efficitur, nunc sit amet ornare volutpat, diam augue tempor sapien, tempus ullamcorper arcu est hendrerit quam. Vestibulum sodales id nisl sed aliquet. Vestibulum aliquam dolor ut diam egestas elementum. Aliquam commodo est non nisi tristique, non congue libero mattis. Sed lorem felis, blandit a nibh a, accumsan porttitor nisl. Mauris ornare euismod accumsan. Aenean in massa facilisis, tincidunt diam vel, dignissim velit. Suspendisse sed dignissim urna. Quisque orci tellus, hendrerit nec tempus at, bibendum at justo. Fusce vitae scelerisque felis, vel porta velit.
    </p>
    <p>
      Praesent malesuada lacinia mauris nec imperdiet. Maecenas a tellus condimentum, efficitur nunc sed, rhoncus lorem. Nam et ante id tortor lobortis ultricies. Suspendisse scelerisque nulla sapien, eu rhoncus est fringilla eu. Duis risus mi, condimentum vitae porttitor eget, convallis eu nulla. Donec ultrices velit a lorem pellentesque laoreet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse diam ante, hendrerit sed pretium viverra, consequat eget arcu. Mauris sed facilisis neque. Mauris id ligula velit. Curabitur lobortis dignissim dui non eleifend. Praesent rhoncus viverra dui, ac suscipit tellus consectetur id. Sed non tincidunt justo, non iaculis eros. Pellentesque sodales aliquam est in sodales. Nunc et tortor interdum, congue augue sed, euismod nisl.
    </p>
  </div>
</div>
              
            
!

CSS

              
                .container {
  display: flex;
  align-items: center;
  justify-content: center;
  
  .content {
    width: 50%;
    
    .image-container {
      background: #d1c4e9;
      padding-top: 44%;
      position: relative;
      
      img {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        object-fit: cover;
      }
    }

  }
}


              
            
!

JS

              
                
              
            
!
999px

Console