cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <section class="p-article__container">
  <article class="p-article">
    <h2 class="p-article__title">Article Title</h2>

    <p class="p-article__subhead">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe eos explicabo minus cumque laboriosam ut fuga reprehenderit nulla illo.
    </p>
    
    <img class="p-article__img" src="http://lorempixel.com/400/275/sports" />
  </article>
  
  <article class="p-article">
    <h2 class="p-article__title">Article Title</h2>

    <p class="p-article__subhead">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit quia velit perspiciatis atque deserunt, vitae voluptatibus distinctio modi similique dolores minima quo placeat.
    </p>
    
    <img class="p-article__img" src="http://lorempixel.com/400/300/sports" />
  </article>
  
  <article class="p-article">
    <h2 class="p-article__title">Article Title</h2>

    <p class="p-article__subhead">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit quia velit perspiciatis atque deserunt, vitae voluptatibus distinctio modi similique dolores.
    </p>
    
    <img class="p-article__img" src="http://lorempixel.com/400/250/sports" />
  </article>
  
  <article class="p-article">
    <h2 class="p-article__title">Article Title</h2>

    <p class="p-article__subhead">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid, officia! Temporibus quae, doloribus tempore repellat fugit, excepturi minima aliquid. Consequuntur, aliquam corrupti, nam neque expedita ipsum possimus ducimus optio eveniet.
    </p>
    
    <img class="p-article__img" src="http://lorempixel.com/400/300/sports" />
  </article>
  
  <article class="p-article">
    <h2 class="p-article__title">Article Title</h2>

    <p class="p-article__subhead">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe eos explicabo minus cumque laboriosam ut fuga reprehenderit nulla illo. Sit dignissimos cupiditate blanditiis.
    </p>
    
    <img class="p-article__img" src="http://lorempixel.com/400/250/sports" />
  </article>
  
  <article class="p-article">
    <h2 class="p-article__title">Article Title</h2>

    <p class="p-article__subhead">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quisquam blanditiis, expedita fugit suscipit commodi doloremque sint consectetur sapiente, nisi nobis laboriosam repudiandae provident quia culpa. Sit dignissimos cupiditate blanditiis, labore quis iusto.
    </p>
    
    <img class="p-article__img" src="http://lorempixel.com/400/250/sports" />
  </article>
</section>
            
          
!
            
              .p-article__container {
  display: flex;
  flex-wrap: wrap;
}

.p-article {
  display: flex;
  flex-direction: column;
  // justify-content: space-between;
  flex: 1 1 15em;
  box-sizing: border-box;
  padding: 1em;
  cursor: pointer;
  
  border: 1px solid black;
}

.p-article__subhead { margin-bottom: 2.5em; }

.p-article__img {
  display: block;
  margin: auto auto 0;
  max-width: 100%;
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console