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="wrapper">
	<div class="masonry">
		<div class="item">1 Lorem ipsum dolor sit amet, consectetur adipisicing elit.  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum? </div>
		<div class="item">2 Lorem ipsum dolor sit amet, consectetur adipisicing elit.  Incidunt sit unde minima in nostrum? </div>
		<div class="item">3 Lorem ipsum dolor sit amet, consectetur adipisicing elit.  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum? </div>
		<div class="item">4 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum? </div>
		<div class="item">5 Neque, vitae, fugiat, libero corrupti officiis sint facilis tempora quidem repudiandae praesentium odit similique adipisci aut.</div>
		<div class="item">6 Incidunt sit unde minima in nostrum? Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?  Incidunt sit unde minima in nostrum?   </div>
		<div class="item">7 Ducimus, voluptates, modi, delectus animi maiores consequuntur repellat quisquam fugiat eum possimus enim culpa totam praesentium magni quae!</div>
		<div class="item">8 Lorem ipsum dolor sit amet, dicta dolore adipisci hic ipsam velit deleniti possimus cumque accusantium rerum quibusdam.</div>
		<div class="item">9 Lorem ipsum dolor sit amet, dicta dolore adipisci hic ipsam velit deleniti possimus cumque accusantium rerum quibusdam.</div>
		<div class="item">10 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, praesentium consequatur ducimus commodi quam ex illo omnis dicta reiciendis vel nesciunt deserunt aut sequi nam mollitia perferendis ipsam possimus temporibus!</div>
		<div class="item">11 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, praesentium consequatur ducimus commodi quam ex illo omnis dicta reiciendis vel nesciunt deserunt aut sequi nam mollitia perferendis ipsam possimus temporibus!</div>
		<div class="item">12 Ab, adipisci, temporibus eaque quis harum perferendis incidunt cupiditate doloribus dolor numquam voluptates ipsum dolore aspernatur et voluptate ipsam beatae animi culpa.</div>
	</div>
</div>
              
            
!

CSS

              
                body {
    font: 1em/1.67 'Open Sans', Arial, Sans-serif;
    margin: 0;
    background: #e9e9e9;
}

.wrapper {
    max-width: 95%;
    margin: 3em auto;
	width: 1260px;
}

.masonry {
/* Masonry basic */
    margin: 1.5em 0;
    padding: 0;
    -moz-column-gap: 1.5em;
    -webkit-column-gap: 1.5em;
    column-gap: 1.5em;
    font-size: .85em;
/* Masonry column */	
	-moz-column-count: 5;
	-webkit-column-count: 5;
	column-count: 5;	
	
	
}

.item {
/* Masonry bricks or child elements */
    background-color: #fff;
    width: 100%;	
    display: inline-block;
    padding: 1em;
    margin: 0 0 1.5em;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-shadow: 2px 2px 4px 0 #ccc;
}





@media only screen and (max-width: 1100px) {
    .masonry {
        -moz-column-count: 4;
        -webkit-column-count: 4;
        column-count: 4;
    }
}

@media only screen and (max-width: 900px) {
    .masonry {
        -moz-column-count: 3;
        -webkit-column-count: 3;
        column-count: 3;
    }
}


@media only screen and (max-width: 700px) {
    .masonry {
        -moz-column-count: 2;
        -webkit-column-count: 2;
        column-count: 2;
    }
}

@media only screen and (max-width: 400px) {
    .masonry {
        -moz-column-count: 1;
        -webkit-column-count: 1;
        column-count: 1;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console