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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

              <article class="post">
  <header class="post-header">
    <h1>Header Level 1</h1>
    <p>This is some meta data</p>
  <section class="post-content">

    <p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em>      Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci,
      sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>

    <img src="http://fillmurray.com/1600/900" />

    <h2>Header Level 2</h2>

      <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
      <li>Aliquam tincidunt mauris eu risus.</li>

      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus
        turpis elit sit amet quam. Vivamus pretium ornare est.</p>

    <div class="fluid-width-video-wrapper">
      <iframe width="560" height="315" src="https://www.youtube.com/embed/8GsXbuR23WU?ecver=1" frameborder="0" allowfullscreen></iframe>

    <h3>Header Level 3</h3>

      <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
      <li>Aliquam tincidunt mauris eu risus.</li>

#header h1 a {
  display: block;
  width: 300px;
  height: 80px;

    <aside class="colored-bg-tier">
      <h2>What about tiers with colored backgrounds?</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores repellendus accusantium nostrum minima a ut perspiciatis ullam molestiae. Unde numquam, quisquam! Molestiae ipsa nesciunt reiciendis tempore voluptatum sequi sed sapiente?</p>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam, dolores laboriosam nihil corrupti veniam eveniet quaerat cupiditate dolore quam voluptatum facere magni odit ipsum iste qui accusamus. Harum, rerum, incidunt?</p>

              /* Reset Stuff */
body {
  padding: 0;
  margin: 0;
  line-height: 1.5;

img {
  display: block;
  max-width: 100%;

li {
  margin-left: 1.5em;

/* FitVids Stuff */
.fluid-width-video-wrapper {
  position: relative;
  height: 0;
  width: 100%;
  padding-top: 56.35%;
  iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

/* CSS Trick Begins Here */
.post-content > *:not(img):not(.fluid-width-video-wrapper):not(.colored-bg-tier),
.colored-bg-tier > * {
  padding-left: 5%;
  padding-right: 5%;
  max-width: 50rem;  /*REM not EM */
  margin-left: auto;
  margin-right: auto;

.post-content > img,
.post-content > .fluid-width-video-wrapper {
  width: 1600px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;

.colored-bg-tier {
  background: #f0f0f0;
  padding-top: 5%;
  padding-bottom: 5%;

/* Custom Post styles */
.post-content > blockquote {
  max-width: 47rem!important;
  /* This isn't good :( But I could move it to the exemption list if I want*/
  font-style: italic;

.post-header {
  border-bottom: 1px solid #ccc;
  h1 {
    margin-bottom: 0;
  p {
    margin-top: 0;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................