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.

            
              <h1>CSS3 Column Layout (Simple)</h1>

<div id="wrapper">
    <div id="cols">
        <div class="item">
          <img src="http://placekitten.com/400/700?image=1" />
            <p>0) Craft beer farm-to-table.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/450?image=2" />
            <p>1) Mollit wolf veniam, leggings art party semiotics Brooklyn High Life sustainable occaecat Banksy actually.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/600?image=3" />
            <p>2) Letterpress american apparel cliche proident ad quinoa. Twee church-key chillwave, pickled cred photo booth art party aute. Quinoa do street art fashion axe dolore, sapiente 3 wolf moon nesciunt adipisicing skateboard meh laborum.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/300?image=4" />
            <p>3) Terry Richardson nisi incididunt.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/900?image=6" />
            <p>3.5) Stumptown deserunt eu raw denim kitsch Etsy ullamco cray ugh proident High Life mlkshk. Bitters banjo nihil.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/650?image=7" />
            <p>4) Authentic blue bottle thundercats pariatur pickled. Tote bag readymade polaroid, Tonx magna tousled +1 Vice ennui wayfarers delectus ullamco whatever umami Bushwick.  Yr reprehenderit Vice, tattooed anim typewriter 90's irony freegan sapiente actually pariatur.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/700?image=8" />
            <p>5) Nostrud quis dreamcatcher mollit. Beard cornhole art party, direct trade PBR sartorial labore esse accusamus eiusmod mustache cardigan sustainable officia. Irony bicycle rights kale chips, aliqua pop-up chillwave dreamcatcher Austin cillum raw denim High Life viral. </p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/300?image=9" />
            <p>6) Salvia Vice placeat, semiotics 3 wolf moon.</p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/500?image=10" />
            <p>7) Accusamus banjo blog DIY viral bicycle rights. Banjo wayfarers 8-bit, ad four loko meh before they sold out scenester literally cray aliquip pork belly McSweeney's ullamco. </p>
        </div>
        <div class="item">
            <img src="http://placekitten.com/400/800?image=11" />
            <p>8) Cliche cred Truffaut nostrud laboris excepteur, church-key single-origin coffee id chambray beard. Gentrify ullamco itemterest, pickled selvage mlkshk Cosby sweater readymade assumenda Neutra.</p>
        </div>
    </div>
</div>

<p>Originally from <a href="https://cssdeck.com/labs/css-only-pinterest-style-columns-layout">https://cssdeck.com/labs/css-only-pinterest-style-columns-layout</a>. Works in FF 22, Chrome 28, and should work in IE10. IE9 requires polyfill.</p>
            
          
!
            
              #wrapper {
    //width: 900px;    
    margin: 20px auto;
    padding: 10px;
    outline: solid black 1px;
    background-color: gainsboro;  
}

#cols {
    column-width: 200px;
		column-count: 4;
    column-gap: 10px;
}

.item {
    //display: inline-block;
    background: #FEFEFE;
    margin-bottom: 10px;
    padding: 10px;
    -webkit-column-break-inside: avoid;
    -moz-column-break-inside: avoid;
    column-break-inside: avoid;
	page-break-inside: avoid;
}

.item img {
    width: 100%;
    border-bottom: 1px solid black;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

            
          
!
999px
🕑 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 ..................

Console