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.

            
              <div class="wrapper">
  <header class="top">
    <h1>Quantity Ordering</h1>
  </header>

  <section class="articles">
    <article>
      <header class="title">
        <h2>Quantity Queries</h2>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. A numquam facilis cumque alias autem eum!</p>
    </article>
    <article>
      <header class="title">
        <h2>Sass for “Quantity Queries”</h2>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. A numquam facilis cumque alias autem eum!</p>
    </article>
    <article>
      <header class="title">
        <h2>How to use Quantity Queries</h2>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. A numquam facilis cumque alias autem eum!</p>
    </article>
    <article>
      <header class="title">
        <h2>Flexbox Presentational Ordering</h2>
      </header>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. A numquam facilis cumque alias autem eum!</p>
    </article>
    <div class="ad">
      <h3>Learn to code here!</h3>
    </div>
  </section>
  <footer>
    <p>Copyright Quantity Ordering 2015</p>
  </footer>
</div>
            
          
!
            
              * {
  box-sizing: border-box;
}

body {
  background: #2D2F36;
  color: white;
}

.wrapper {
  width: 600px;
  margin: 0 auto;
}

header.top {
  background: #F76859;
  padding: 25px 10px;
}

section.articles {
  background: #8E7D88;
  display: flex;
  padding: 10px;
  flex-flow: column wrap;
}

article {
  background: #DCD9DA;
  padding: 10px;
  margin: 10px 0;
  color: #2D2F36;
}

.ad {
  background: #8C90DB;
  color: #2D2F36;
  padding: 25px;
  font-size: 36px;
  text-align: center;
}

footer {
  padding: 10px;
}

/* Quantity Ordering */
/*Put the ad after the first 3 articles*/

section.articles > article:nth-last-child(n+4) ~ .ad {
  order: 2;
}

section.articles > article:nth-child(n+4) {
  order: 3;
}


            
          
!
999px
Loading ..................

Console