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

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.

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="wrap">
  <div class="box box1">
    <p>Extraplanetary Drake Equation Cambrian explosion colonies shores of the cosmic ocean Euclid. Are creatures of the cosmos explorations a very small stage in a vast cosmic arena explorations across the centuries concept of the number one. Two ghostly white figures in coveralls and helmets are softly dancing rich in heavy atoms a still more glorious dawn awaits emerged into consciousness another world network of wormholes. </p>
  </div>
  <div class="box box2">
    <p>Descended from astronomers brain is the seed of intelligence rich in mystery courage of our questions vanquish the impossible a still more glorious dawn awaits and billions upon billions upon billions upon billions upon billions upon billions upon billions.</p>
  </div>
</div>

<div class="wrap wrap2">
  <div class="box box1">
    <p>Extraplanetary Drake Equation Cambrian explosion colonies shores of the cosmic ocean Euclid. Are creatures of the cosmos explorations a very small stage in a vast cosmic arena. </p>
  </div>
</div>

<div class="wrap wrap3">
  <div class="box box1">
    <p>Extraplanetary Drake Equation Cambrian explosion colonies shores of the cosmic ocean Euclid. A Are creatures of the cosmos explorations a very small stage in a vast cosmic arena explorations across the centuries concept of the number one. Two ghostly white figures in coveralls and helmets are softly dancing rich in heavy atoms a still more glorious dawn awaits emerged into consciousness another world network of wormholes. </p>
    <p>Descended from astronomers brain is the seed of intelligence rich in mystery courage of our questions vanquish the impossible a still more glorious dawn awaits and billions upon billions upon billions upon billions upon billions upon billions upon billions.</p>
  </div>
  <div class="box box2">
    <p>Descended from astronomers brain is the seed of intelligence rich in mystery courage of our questions vanquish the impossible a still more glorious dawn awaits and billions upon billions upon billions upon billions upon billions upon billions upon billions.</p>
    <p>Descended from astronomers brain is the seed of intelligence rich in mystery courage of our questions vanquish the impossible a still more glorious dawn awaits and billions upon billions upon billions upon billions upon billions upon billions upon billions.</p>
    <p>Descended from astronomers brain is the seed of intelligence rich in mystery courage of our questions vanquish the impossible a still more glorious dawn awaits and billions upon billions upon billions upon billions upon billions upon billions upon billions.</p>
  </div>
</div>
              
            
!

CSS

              
                html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  -webkit-text-size-adjust: 100%; /* stop ios zooming text  on orientation change */
  text-size-adjust: 100%;
  line-height: 1.5;
  margin: 0;
}

.wrap {
  display: flex;
  background: linear-gradient(
    -80deg,
    yellow 49.95%,
    transparent 49.95%,
    transparent 50%,
    orange 50.1%
  );
  margin: 0 0 2rem;
}
.box {
  padding: 50px;
  flex: 0 0 50%;
  width: 50%;
}

/* second example */

.wrap2 {
  background: linear-gradient(-80deg, transparent 69.95%, orange 70.05%),
    url(https://picsum.photos/id/238/400/200) no-repeat 0 0;
  background-size: cover;
}
.wrap2 .box {
  width: 30%;
  flex: 0 0 30%;
}

/* third example */

.wrap3 .box1::before,
.wrap3 .box2::before {
  content: "";
  display: block;
  height: 100%;
  width: 50px;
  margin-right: -25px;
  float: right;
  shape-outside: polygon(100% 0, 0% 100%, 100% 100%);
  shape-margin: 25px;
}
.wrap3 .box1::before {
  shape-outside: polygon(220% 0, 0% 100%, 100% 100%);
}

.wrap3 .box2::before {
  float: left;
  margin: 0 50px 0 0;
  shape-outside: polygon(75% 0%, 0% 0%, 25% 100%);
  shape-margin: 20px;
}
.wrap3 .box {
  padding: 25px 0;
}
.wrap3 .box1 {
  text-align: justify;
  padding-right: 45px;
}
.wrap3 .box2 {
  padding: 25px 50px 25px 0;
}
.wrap3 p {
  padding: 0 0 0 50px;
  margin: 1rem 0;
}
/* note at small screen sizes this last example starts to overflow the background*/

              
            
!

JS

              
                
              
            
!
999px

Console