cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <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>, but support for flex-containers is currently (<time datetime="11-07-2017">07/2017</time>) very limited.</p>

<h2>space-evenly</h2>
(Works currently only in Firefox)
<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>
            
          
!
            
              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;
}
            
          
!
999px
Loading ..................

Console