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

              
                <div class="container">
  <div class="picture-holder">
  </div>
  <div class="story-holder">
    <div class="title">
      <h1>Out of our minds</h1>
    </div>
    <div class="intro">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis optio deserunt eveniet, maxime omnis voluptatem, sit a rerum consequatur nostrum eos voluptates reiciendis nam eum eligendi blanditiis praesentium repudiandae facilis hic at vitae ad quo quas sapiente! Eius, repellat, sunt.</p>
    </div>
    <div class="article">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, nostrum porro beatae consequuntur nihil, praesentium voluptate aspernatur, fugiat quia consectetur nisi, quod quas repellat placeat. Tempore aut repellendus ipsa id sed ipsum labore veniam reiciendis, unde sunt aliquam, culpa deserunt excepturi molestias quibusdam.</p>
      <p>Eveniet magnam ratione quaerat sit id quas ab optio assumenda excepturi laudantium nobis facere, aut ad dolores libero consectetur tempora numquam, fugit incidunt sunt officia possimus natus neque. Veniam unde accusamus optio fugit ratione voluptates nisi fugiat eveniet. Facilis aperiam provident cum, pariatur!</p>
      <p>Eaque quia debitis illum asperiores fugiat officia, delectus adipisci officiis dolorum voluptas aut sapiente necessitatibus totam dolor qui accusantium odio assumenda, reiciendis, pariatur porro molestias a temporibus repudiandae eveniet. Quas nostrum, consequuntur minima, ullam quidem facere modi minus eos voluptatum, neque itaque sapiente?</p>
      <p>Eius, deserunt molestiae quo perspiciatis! Quam omnis veniam tempora incidunt repellendus vitae? Quasi odio quae ipsum ea pariatur amet quibusdam voluptatibus, voluptatum fuga magnam aliquam perferendis eveniet reprehenderit est rerum omnis distinctio voluptates quidem, non consequatur maiores impedit nesciunt. Hic quam voluptates, dignissimos!</p>
    </div>
  </div>
</div>
      
              
            
!

CSS

              
                body {
  font-size:100%;
  line-height:1.5;
  font-family: "Roboto Slab", sans-serif;
  color:#222;
  background:rgb(0,0,40);
}

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

.group {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

img {
  max-width:100%;
  height:auto;
  vertical-align:baseline;
}

a {
  text-decoration:none;
}

.max(@maxWidth;
  @rules) {
    @media only screen and (max-width: @maxWidth) {
      @rules();
    }
  }

.min(@minWidth;
  @rules) {
    @media only screen and (min-width: @minWidth) {
      @rules();
    }
  }

.container {
  background-color:#fff;
  max-width:1400px;
  margin:0 auto;
}
.picture-holder {
  background-image:url(http://lorempixel.com/800/900/people/10/);
  background-repeat:no-repeat;
  background-position:center top;
  background-size:cover;
  min-height:300px;
  padding-top:300px;
}
.story-holder {
  padding:36px 36px;
  margin:0;
}

h1 {
  font-family:"Playfair Display", serif;
  font-size:3em;
  line-height:1;
  padding-bottom:24px;
  border-bottom:16px solid rgb(20, 20,59);
  margin-bottom:24px;
  text-transform:uppercase;
  color:rgb(20, 20,59);
  text-align:center;
}
.intro {
  font-size:1em;
  font-family:"Playfair Display", sans-serif;
  color:rgb(20,20,59);
  padding-bottom:24px;
  border-bottom:3px solid rgb(20,20,59);
  margin-bottom:24px;
  line-height:1.3;
  font-style:italic;
}
.article {
  line-height:1.4;
  p {
    font-size:0.875em;
    margin-bottom:16px;
  }
}
.min(400px, {
  h1 {
    font-size:4em;
  }
  .intro {
    font-size:1.15em;
  }
  .article p {
    font-size:0.925em;
  }
});

.min(800px, {
  .container {
    display:flex;
  }
  .story-holder {
    background:rgba(255,255,240,0.8);
    margin:0;
    width:50%;
  }
  .picture-holder {
    width:50%;
    order:2;
  }
  h1 {
    font-size:6em;
    text-align:left;
  }
  .intro {
    font-size:1.25em;
  }
  .article p {
    font-size:1em;
  }
});
.min(1100px, {
  h1 {
    font-size:9em;
    line-height:0.9;
  }
});
              
            
!

JS

              
                
              
            
!
999px

Console