Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="grid-layout">

  <div class="cell-1-3" style="background-color:yellow">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent lacinia enim congue vehicula venenatis. Fusce auctor ante eget congue vulputate. Integer posuere massa arcu, id lacinia elit elementum vel. Etiam eleifend tincidunt tellus, nec faucibus lorem. Integer et elementum est. Phasellus pellentesque egestas nibh pharetra dapibus. Sed urna sapien, hendrerit in diam ut, adipiscing auctor velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
  </div>
  <div class="cell-1-3" style="background-color:purple">
    <p>Duis nec condimentum arcu, vitae ornare ipsum. Integer egestas elit auctor erat hendrerit, pretium ultricies est hendrerit. Donec dolor lectus, malesuada eu nulla vel, ornare aliquam lectus. Nulla dapibus arcu et eros accumsan, eget accumsan augue aliquam. Curabitur hendrerit neque sodales enim pharetra, ut sagittis ante dignissim. Fusce ut libero nec diam vestibulum tincidunt non et felis. Proin et pretium nisl.</p>
  </div>
  <div class="cell-1-6" style="background-color:red">
    <p>Proin convallis est vel justo euismod, sit amet euismod sem molestie. Mauris porta fermentum varius. In quis fringilla purus, sed imperdiet est. Proin elit velit, tincidunt sit amet iaculis a, vulputate a lacus. Fusce volutpat tortor quis enim feugiat, nec varius eros posuere. Suspendisse et vestibulum orci, eu mollis leo. Mauris non sapien ipsum. Fusce in tempus massa. </p>
  </div>
  <div class="cell-1-6" style="background-color:green">
    <p>Ut id tellus pulvinar, rutrum purus eu, posuere est. Quisque hendrerit lobortis elit, sit amet commodo odio dignissim at. Sed vel purus diam. Proin eget diam eget augue ornare vulputate vitae ut felis. Etiam tempor est in risus sodales convallis. Vivamus et odio dignissim, aliquet metus at, dictum ante.</p>
  </div>

</div>


              
            
!

CSS

              
                .grid-layout {
            display: table;
            content: "";
            clear: both;
}
 
[class*="cell"] {
            float: left;
            clear: right;   /** Hack IE7 et 6 pour rendre compatible l’utilisation des pourcentages **/
}

.cell-1-1 {
            width: 100%;
}
.cell-5-6 {
            width: 83.333%;
}
.cell-2-3 {
            width: 66.666%;
}
.cell-1-2 {
            width: 50%;
}
.cell-2-5 {
            width: 40%;
}
.cell-1-3 {
            width: 33.333%;
}
.cell-1-4 {
            width: 25%;
}
.cell-1-5 {
            width : 20%;
}
.cell-1-6 {
            width: 16.666%;
}

@media (max-width: 620px) {
  .grid-layout div {
    display: block;
    width: 100% !important;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console