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

              
                <header><a href="http://www.christianjespersen.com/wired_magazine/">
    Where I found the original layout.
  </a>
  <hr>
  <header>
    <div class="wrapper">
      <div class="panel panel-a">

        <img class="panel__caterpillar" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/780593/catepillar.png" alt="catepillar">
        <figcaption> But if humanity is going to<br> survive, we may have to learn to overcome the ick factor.</figcaption>
      </div>
      <div class="panel panel-b">
        <p class="drop-letter">
          Pommy ipsum stew and dumps real ale tad squirrel sausage roll off t'pub throw a paddy, nicked twiglets flabbergasted half-inch it pompous in the jacksy stew and dumps, rivetting stuff blimey jammy git pompous porky-pies naff off bottled it. </p>
        <p>
          The black death gob Doctor Who on his tod off with her head gravy cheese and chips mince pies bargain Betty Big Ben crisps, I could reet fancy a jolly hockey sticks chav alright duck numbskull easy peasy earwig. Codswallop pigeons in Trafalgar Square a cracking scones cobbles Kate and Will, that's ace up North and could be a bit of a git.
        </p>
      </div>
      <div class="panel panel-c">
        <p>
          Pommy ipsum stew and dumps real ale tad squirrel sausage roll off t'pub throw a paddy, nicked twiglets flabbergasted half-inch it pompous in the jacksy stew and dumps, rivetting stuff blimey jammy git pompous porky-pies naff off bottled it. </p>
        <p>
          The black death gob Doctor Who on his tod off with her head gravy cheese and chips mince pies bargain Betty Big Ben crisps, I could reet fancy a jolly hockey sticks chav alright duck numbskull easy peasy earwig. Codswallop pigeons in Trafalgar Square a cracking scones cobbles Kate and Will, that's ace up North and could be a bit of a git.
        </p>
      </div>
      <div class="panel panel-d"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/780593/drink.png " alt="drink">
      </div>
      <div class="panel panel-e"> The black death gob Doctor Who on his tod off with her head gravy cheese and chips mince pies bargain Betty Big Ben crisps, I could reet fancy a jolly hockey sticks chav alright</div>
      <div class="panel panel-f">
        <p>Pommy ipsum gobsmacked pulled out the eating irons grab a jumper it's the dogs bollocks chinwag know your onions, Kate and Will doofer copper it's the dogs bollocks rambunctious absobloodylootely. River Song it's nicked nutter bag egg's old boy terribly blimey one feels that Sonic Screwdriver
        </p>
        <p>The Doctor, twiglets sling one's hook what a load of cobblers nosh Queen Elizabeth numpty. Off with her head bull dog god save the queen doing my head in biscuits cottage pie, terribly flog porky-pies. Rivetting stuff trouble and strife bow ties are cool knows bugger all about nowt black pudding roast beef know your onions, darling a cracking up at the crack of dawn proper Bad Wolf.</p>
      </div>
      <div class="panel panel-g">
        <p>Pommy ipsum gobsmacked pulled out the eating irons grab a jumper it's the dogs bollocks chinwag know your onions, Kate and Will doofer copper it's the dogs bollocks rambunctious absobloodylootely. River Song it's nicked nutter bag egg's old boy terribly blimey one feels that Sonic Screwdriver The Doctor, twiglets sling one's hook what a load of cobblers nosh
        </p>
        <p>
          Queen Elizabeth numpty. Off with her head bull dog god save the queen doing my head in biscuits cottage pie, terribly flog porky-pies. Rivetting stuff trouble and strife bow ties are cool knows bugger all about nowt black pudding roast beef know your onions, darling a cracking up at the crack of dawn proper Bad Wolf.
        </p>
      </div>
      <div class="panel panel-h"><img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/780593/grasshopper.png' alt='grasshopper'>
        <figcaption>
          A cockroach in your drink is gross, but a grasshopper on a stick could be lunch.
        </figcaption>
      </div>

      <footer class="footer">
        <small>Sep. 2012 <strong>Wired</strong> 048
        </small>

      </footer>
    </div>
              
            
!

CSS

              
                $yellow: #f3f050;

*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  margin: 40px;
  font-family: "Inconsolata";
  font-size: 14px;
  background-color: #fff;
  color: #444;
  a {
    color: #1f7c49;
  }
}
hr {
  margin-bottom: 2em;
}

h1,
p {
  margin: 0 0 1em 0;
}

img {
  width: 100%;
}
/* no grid support? */

.wrapper {
  display: flex;
  flex-wrap: wrap;
}

.drop-letter:first-child:first-letter {
  color: $yellow;
  float: left;
  font-family: "Inconsolata";
  font-size: 75px;
  line-height: 60px;
  padding-top: 4px;
  padding-right: 8px;
  padding-left: 3px;
  text-shadow: -4px 2px #1f7c49;
}

.wrapper {
  display: grid;
  margin: 0 auto;
  grid-template-columns: repeat(2, 50%);
  grid-template-rows: auto;
  grid-row-gap: 15px;
  grid-column-gap: 15px;
}
.panel-a {
  grid-row: 1/2;
  grid-column: 1/3;
}

.panel-b {
  grid-row: 2;
  grid-column: 1/2;
}
.panel-c {
  grid-row: 2;
  grid-column: 2/3;
}
.panel-d {
  grid-row: 4/5;
  grid-column: 1/2;
  img {
    width: 50%;
  }
}
.panel-e {
  grid-row: 3/4;
  grid-column: 1/3;
}
.panel-f {
  grid-row: 4/5;
  grid-column: 2/3;
}
.panel-g {
  grid-row: 5;
  grid-column: 1/2;
}
.panel-h {
  grid-row: 5;
  grid-column: 2/3;
}

footer {
  grid-row: 6;
  grid-column: 1/3;
  text-align: right;
}
figcaption {
  font-weight: bold;
  margin: 1.5em;
  text-align: center;
}
@media (min-width: 1090px) {
  .wrapper {
    max-width: 1200px;
    margin: 0 20px;
    display: grid;
    grid-gap: 20px;
  }
  .wrapper {
    display: grid;
    margin: 2em;
    grid-template-columns: repeat(6, 12.5em);
    grid-template-rows: repeat(10, 100px);
  }

  .panel {
    /* needed for the flex layout*/
    margin-left: 5px;
    margin-right: 5px;
    flex: 1 1 200px;
  }
  hr {
    background: $yellow;
    color: $yellow;
    height: 8px;
    border: none;
  }
  .catepillar {
    width: 100%;
    max-width: 480px;
    margin-left: -2em;
  }
  .panel-a {
    grid-row: 1/2;
    grid-column: 1/4;
    margin-bottom: 1em;
  }
  .panel-b {
    grid-column: 1/2;
    grid-row: 5;
  }
  .panel-c {
    grid-column: 2/3;
    grid-row: 5;
    p:first-of-type {
      margin-top: -3em;
    }
  }
  .panel-d {
    grid-column: 3/4;
    grid-row: 3;

    img {
      width: auto;
      max-width: 380px;
      margin-top: 3em;
    }
  }
  .panel-e {
    grid-column: 4;
    grid-row: 1;
  }
  .panel-f {
    grid-column: 5;
    grid-row: 1;
  }
  .panel-g {
    grid-column: 6;
    grid-row: 1;
  }
  .panel-h {
    grid-column: 5/7;
    grid-row: 5;
  }
  footer {
    grid-row: 11;
    grid-column: 6;
    text-align: right;
  }
  figcaption {
    transform: rotate(-10deg);
    font-size: 2em;
    margin-bottom: 1em;
    max-width: 620px;
    font-weight: normal;
    margin-left: -2em;
    text-align: left;
  }
}

/* We need to set the margin used on flex items to 0 as we have gaps in grid.  */

@supports (display: grid) {
  .wrapper > * {
    margin: 0;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console