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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="card-container">
  <div class="card card--main">
    <h1>Main Headline</h1>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus in lectus maximus, lobortis est eu, pharetra massa. Duis lobortis placerat velit, eu egestas erat mattis id. Proin at dapibus magna. Maecenas nibh elit, venenatis eu leo vel, viverra pulvinar eros. Sed id turpis ac eros facilisis facilisis. Curabitur pharetra porttitor justo ac condimentum. Quisque odio felis, tincidunt at convallis ac, condimentum et metus. In viverra, ex vitae convallis fringilla, lectus ligula pretium nibh, ut ornare sem sem id turpis. Donec vitae risus eu ex lobortis lobortis.
    </p>
  </div>
  <div class="card card--side">
    <h2>Sidebar Headline</h2>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus in lectus maximus, lobortis est eu, pharetra massa. Duis lobortis placerat velit, eu egestas erat mattis id.
    </p>
  </div>
</div>
              
            
!

CSS

              
                body {
  background-color: #f1f4f5;
  font-family: sans-serif;
}

.card-container {
  display: flex;
  align-items: baseline;
  margin: 50px auto 0;
  max-width: 800px;
}

.card {
  background-color: white;
  border: 1px solid #dadfe2;
  border-radius: 4px;
  margin: 10px;
  padding: 20px;
}

.card > h1 {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 20px;
}

.card > h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.card > p {
  line-height: 1.4;
}

.card--main {
  flex: 2 0 0;
}

.card--side {
  flex: 1 0 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console