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

              
                <h1>justify-content: space-evenly for flex-containers</h1>

<p><code>justify-content: space-evenly</code> <a href="https://css-tricks.com/snippets/css/complete-guide-grid/#article-header-id-20">works great with grid-containers</a>, <del>but support for flex-containers is currently (<time datetime="11-07-2017">07/2017</time>) very limited.</del></p>

<h2>space-evenly</h2>
(Works in every major desktop browser except for Edge 16)
<blockquote>The alignment subjects are distributed so that the spacing between any two adjacent alignment subjects, before the first alignment subject, and after the last alignment subject is the same.</blockquote> 
<div class="parent evenly">
  <div class="item">item 3</div>
  <div class="item">item 3</div>
  <div class="item">item 3</div>
</div>

<h2>space-between</h2>
<blockquote>
The first alignment subject is placed flush with the start edge of the alignment container, the last alignment subject is placed flush with the end edge of the alignment container, and the remaining alignment subjects are distributed so that the spacing between any two adjacent alignment subjects is the same. </blockquote>
<div class="parent between">
  <div class="item">item 3</div>
  <div class="item">item 3</div>
  <div class="item">item 3</div>
</div>

<h2>space-around</h2>
<blockquote>The alignment subjects are evenly distributed in the alignment container, with a half-size space on either end. The alignment subjects are distributed so that the spacing between any two adjacent alignment subjects is the same, and the spacing before the first and after the last alignment subject is half the size of the other spacing. </blockquote>

<div class="parent around">
  <div class="item">item 3</div>
  <div class="item">item 3</div>
  <div class="item">item 3</div>
</div>
              
            
!

CSS

              
                body {
  max-width: 500px;
  line-height: 1.4;
}

.parent {
  display: flex;
  border: 2px solid #000000;
  margin-bottom: 30px;
  padding: 20px 0;
}

.evenly {
  justify-content: space-evenly;
}

.between {
  justify-content: space-between;
}

.around {
  justify-content: space-around;
}
              
            
!

JS

              
                
              
            
!
999px

Console