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.

              <section class="container">
  <h1>Demo: nth-child explained - Integer</h1>

  <ul class="nce nce3">
   <li>child element 1</li>
   <li>child element 2</li>
   <li>child element 3</li>
   <li>child element 4</li>
   <li>child element 5</li>
   <li>child element 6</li>
   <li>child element 7</li>
   <li>child element 8</li>
   <li>child element 9</li>
   <li>child element 10</li>

  <a class="h4" href="http://www.matt-harris.net/notes/nth-child-explained">Back to the article</a>

<footer class="footer" role="contentinfo">
  <div class="container">

    <h4>Find me here</h4>

    <ul class="footer__social list--unstyled">
      <li class="footer__social-item">
        <a class="icon-social icon-social--twitter" href="https://twitter.com/matty_h"></a>
      <li class="footer__social-item">
        <a class="icon-social icon-social--codepen" href="https://codepen.io/matt-harris/"></a>
      <li class="footer__social-item">
        <a class="icon-social icon-social--github" href="https://github.com/matt-harris"></a>

    <span class="footer__text">Built with <a href="https://www.outlinecss.co.uk">Outline</a></span>

    <span class="footer__text">Copyright © 2016 matt-harris.net | Stealing is naughty.</span>

              @import "compass/css3";

// variables
$color-primary: #39beef;
$color-secondary: #ea5375;
$color-tertiary: #187da4;
$color-white: #fff;
$color-grey: #ccc;
$font-primary: 'Open Sans', Arial, sans-serif;

// demo

.nce {
  list-style-type: none;
  margin: 1.2em 0;
  padding: 0;
  color: $color-white;
  li {
    margin-bottom: 0.5em;
    padding: .5em 1em;
    background-color: $color-primary;

.nce3 li:nth-child(4) {
  background-color: $color-secondary;
              // Demo: nth-child explained - Integer
// http://www.matt-harris.net/notes/nth-child-explained
Loading ..................